Commit Graph

201 Commits

Author SHA1 Message Date
Owen W. Taylor
01136618b8 Guard against selection requestor disappearing
We made a number of unchecked accesses to the selection requestor,
which could cause X errors if the selection requestor vanished
(or we were sent invalid events). Add error traps around all of them.

See https://bugzilla.redhat.com/show_bug.cgi?id=1210814 for an
example of a crash that could be caused by this. (There are about
1000 instances of such a crash in http://retrace.fedoraproject.org
though no linked bug reports specifically talk about cut-and-paste
or DND.)

https://bugzilla.gnome.org/show_bug.cgi?id=756881
2015-10-22 11:05:03 -04:00
Matthias Clasen
b5d3bebae3 Don't use g_list_next in gtkselection.c
We generally access ->next directly.
2015-10-20 06:14:57 -04:00
Jasper St. Pierre
c40ba85ace wayland: Don't use the default display
Pass a display in so that multi-display technology works.
2014-10-27 22:29:41 -07:00
Carlos Garnacho
f48b3cce02 wayland: Replace clipboard implementation
The wayland specific clipboard functions have been replaced by something
more similar to the hooking the win32 backend does, which allows for just
using the default GtkClipboard code in GTK+. As a consequence, the
wayland-specific GtkClipboard implementation is now gone.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
2014-09-01 19:17:53 +02:00
Carlos Garnacho
bd410421d8 gtkselection: Ensure the X11 specific message length only applies to X11
Other backends are compilable together with the X11 one, so the message
lenght limit was applying to them all.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
2014-09-01 19:17:53 +02:00
Rico Tzschichholz
e317117f03 gtk: Fix return annotation of gtk_selection_data_get_text 2014-08-20 08:54:12 +02:00
Ignacio Casal Quinteiro
8f873f3aa3 gtkselection: fix warnings of unused vars on win32 2014-07-22 17:22:00 +02:00
Dieter Verfaillie
daa8b48a33 Fix gtk_selection_data_get_data annotations
The annotations were intended for the return
value, not the instance argument.

https://bugzilla.gnome.org/show_bug.cgi?id=731299
2014-06-12 21:01:01 +02:00
Evan Nemerson
54ec42f035 gtk: port many nullability annotation fixes from Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-30 13:24:20 -07:00
Evan Nemerson
e596e58c51 gtk: port missing array annotations from Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:32 -07:00
Evan Nemerson
0ebc4decbb selection: mark targets param to gtk_target_list_new as allow-none
https://bugzilla.gnome.org/show_bug.cgi?id=728165
2014-04-14 23:27:41 -07:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
a4b5929e81 docs: use apostrophe in *'re 2014-02-07 13:37:09 -05:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
William Jon McCann
7a208fbbf3 docs: use proper apostrophe
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
William Jon McCann
2d003553e8 docs: don't use <emphasis>
It is a little heavy handed. The text can speak for itself.
2014-01-28 02:02:05 -05:00
William Jon McCann
22586ea7c2 docs: use #*-struct instead of <structname> 2014-01-27 19:59:55 -05:00
William Jon McCann
93138e96c1 docs: don't reference nonexisting type in docs 2014-01-21 23:20:38 -05:00
William Jon McCann
9cfa3ba1f6 docs: fix typo in argument list 2014-01-21 18:57:40 -05:00
Matthias Clasen
9f1159a1a8 Fix a compiler warning
Don't return without a value from a non-void function.
2013-12-13 20:05:03 -05:00
Benjamin Otte
d4c8f1028a clipboard: Don't crash when data is requested from NULL window
This could happen if data was requested from a separate screen now that
multi-screen is no longer supported.

Ideally, we'd want to support copying to other screens, but that
requires solving in GDK as that's X-specific so cannot be well
abstracted by GDK (without the reintroduction of multiple screens).

https://bugzilla.gnome.org/show_bug.cgi?id=719314
2013-12-13 19:07:42 +01:00
Bastien Nocera
438cd857c4 all: Add names to timeouts
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
Jasper St. Pierre
ddb4034e8e Fix GI warnings 2013-10-09 14:19:54 -04:00
Phil Clayton
59c4fb9d6a Add missing introspection annotations
https://bugzilla.gnome.org/show_bug.cgi?id=707519
2013-09-10 17:20:15 -04:00
Cosimo Cecchi
f70fc49ebc docs: fix a number of typos and obsolete references 2012-07-02 10:41:11 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Behdad Esfahbod
057a50d58e Bug 658398 - Use of uninitialized variable reported by Valgrind
Fix it.
2011-09-07 16:19:44 -04:00
Benjamin Otte
5bc04bc07b API: gdk: Make GdkEventSelection.requestor a GdkWindow
instead of a GdkNativeWindow. Also change gdk_selection_notify() API to
take a GdkWindow to match this change.
2011-02-01 18:51:57 +01:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Pavel Holejsovsky
2f0d40335b [GI] Add missing (transfer) annotations 2011-01-20 13:57:18 +01:00
Pavel Holejsovsky
3c8fc21e9b [GI] Fixes of existing incorrect annotations 2011-01-20 13:56:06 +01:00
Pavel Holejsovsky
9389054da2 [GI] Add (type) annotations to real types 2011-01-20 10:38:38 +01:00
Matthias Clasen
abc8ac1a8b Move GtkSelection docs inline
At the same time, move private selection API to gtkselectionprivate.h
2011-01-14 19:20:56 -05:00
Matthias Clasen
c7f39eb07e add gtk_selection_data_get_data_with_length API which can be bound
* gtk_selection_data_get_data can't be bound because we need to know the length
  of data inorder to marshal it

https://bugzilla.gnome.org/show_bug.cgi?id=635299
2011-01-03 12:13:30 -05:00
Benjamin Otte
4db086da4b x11: Rename GdkDisplayX11 to GdkX11Display
Also rename all the macros etc.
2010-12-21 12:07:07 -05:00
Matthias Clasen
572bb20011 Deal with property encoding functions
Move everything dealing with compound text to be X11 specific
Only gdk_text_property_to_utf8_list and gdk_utf8_to_string_target
are kept across backends, so add vfuncs for these.

Also, remove the non-multihead-safe variants of all these.
2010-12-21 12:07:03 -05:00
Matthias Clasen
2d7583c0e3 Make gdk_window_{lookup,foreign_new}_for_display backend specific
At the same time, make GDK_IS_DISPLAY_X11 available in gdkx.h, and
add some exemplaric ifdefs to GTK+ code.
2010-12-21 12:06:59 -05:00
Javier Jardón
26a304c54b Move GtkSelectionData to a private header 2010-12-19 20:48:20 +00:00
Benjamin Otte
d50c582961 selection: constify GtkSelectionData getters 2010-12-17 16:47:57 +01:00
Benjamin Otte
e724054d19 API: Remove GDK_WINDOW_XWINDOW() macro
Use GDK_WINDOW_XID() instead.

THis was done using sed, so there might be issues resulting to that.
Feel free to fix.
2010-12-02 20:20:56 +01:00
John (J5) Palmieri
f2a187f27a [gi] add array annotations for DnD related methods 2010-11-19 15:06:40 -05:00
Benjamin Otte
3a55137709 selection: Hi, I can't get my code right
Also, I refuse to compile with -Werror, so I don't notice.
2010-10-18 19:22:44 +02:00
Colin Walters
18578b33c5 Add boxed type and constructor
This allows bindings to sanely construct these.

https://bugzilla.gnome.org/show_bug.cgi?id=632095
2010-10-15 13:54:37 -04:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Benjamin Otte
2ee8fdb79b gtk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Matthias Clasen
1243b4861c Use gdk_error_trap_pop_ignore() where appropriate 2010-09-18 23:17:31 -04:00
Tor Lillqvist
f76fddb8a7 Use accessor functions in Win32-only code 2010-09-09 11:09:55 +03:00