Matthias Clasen
e151058dff
Make gdk logging per-display
...
As far as possible, use per-display debug flags.
This will minimize the debug spew that we get from
the inspector if it is running on a separate display.
2018-01-14 17:05:04 -05:00
Matthias Clasen
c5fc841285
gdk: Reorganize env vars
...
Drop GDK_GL, GDK_VULKAN and GDK_RENDERING_MODE.
Merge the useful bits into GDK_DEBUG.
Drop unused debug flags (CURSOR).
2018-01-14 17:05:04 -05:00
Matthias Clasen
d1eb8cd809
x11: Only set the keymap display once
...
Not necessary to do this more than once.
2018-01-12 09:24:08 -05:00
Matthias Clasen
0ed670ed62
Remove a dead macro
...
GCs have been dead for a long time.
2018-01-04 18:23:36 -05:00
Matthias Clasen
53522f3c25
Document GDK_DISPLAY_XDISPLAY
2017-12-26 13:14:07 -05:00
Emmanuele Bassi
cc80a2ec8e
Annotate gdk_x11_display_get_screen()
...
We're missing the gtk-doc stanza, as well as the transfer annotation for
the returned pointer.
2017-12-21 18:49:25 +00:00
Emmanuele Bassi
6c0de43669
Remove unnecessary introspection annotation
...
Transfer annotations do not apply to integral types.
2017-12-21 18:46:08 +00:00
Timm Bäder
964c6f7d58
x11: Fix wrong condition when unsetting transient-for
...
Setting a new transient-for parent is only possible if the given parent
window is valid, not when it is NULL or valid.
2017-12-21 18:25:51 +01:00
Timm Bäder
f393552fec
x11: Guard against NULL window
...
Otherwise, the NULL parent window causes a crash in the
GDK_WINDOW_IS_DESTROYED call.
2017-12-19 07:39:37 +01:00
Benjamin Otte
3438dcdd4e
x11: Add necessary NULL check
2017-12-16 02:48:12 +01:00
Benjamin Otte
aab86f8b98
x11: Try getting ipc_window vs source_window right
...
This is in preparation for splitting these. Unfortunately, source_window
== ipc_window, so this isn't very debuggable yet.
2017-12-16 02:48:12 +01:00
Benjamin Otte
510581e0ef
x11: Use gdk_drag_context_get_display()
2017-12-16 02:48:12 +01:00
Benjamin Otte
5f326d7ec6
x11: Create IPC window outselves
...
Ignore the passed in IPC window.
2017-12-16 02:48:12 +01:00
Benjamin Otte
a04afde35c
gdk: Remove DRAG_STATUS and DROP_FINISHED events
...
Those are source-side events that are handled by signals of the
Dragontext these days.
2017-12-15 23:48:36 +01:00
Matthias Clasen
61843d60b2
x11: Avoid crash in fallback move emulation
...
Quietly do nothing when there is already an ongoing operation.
This matches the behavior of the ewmh code, and is much nicer
than a crash.
https://bugzilla.gnome.org/show_bug.cgi?id=789054
2017-12-15 16:19:09 -05:00
Matthias Clasen
e92c0e85ec
Replace gdk_keymap_get_for_display by gdk_display_get_keymap
...
Replace all uses of the old function by the new one.
No functional change.
2017-12-15 07:44:58 -05:00
Benjamin Otte
84431ab927
x11: Remove GdkAtom usage from dnd code
...
Use strings instead.
2017-12-14 13:46:37 +01:00
Benjamin Otte
5d70bbf4c4
display: Remove leftover old clipboard APIs
2017-12-14 13:35:32 +01:00
Krzesimir Nowak
5a0fb278d1
x11: Fix erroneous & to be &&
2017-12-14 13:35:32 +01:00
Benjamin Otte
920259c250
x11: Get rid of default Atom converters
...
No, using the default Wayland display is not okay to query Atoms.
2017-12-14 13:35:32 +01:00
Matthias Clasen
84eaf3da7d
Drop atom-related cast macros
...
These don't really add anything, just drop them.
2017-12-13 23:47:02 -05:00
Matthias Clasen
54a6273191
Drop gdk_atom_intern
...
Atoms are just interned strings now, so we can just
use g_intern_string.
2017-12-13 23:39:03 -05:00
Matthias Clasen
4c083c1ed4
Drop gdk_atom_name
...
Since atoms are just interned strings now, we can just
cast them to const char * where needed.
2017-12-13 23:26:23 -05:00
Benjamin Otte
b49a9b9933
dnd: Remove gdk_drag_get_selection()
...
Without selections, drags can't have them either.
Also included is removing the selection from GtkSelectionData.
Includes a bunch of crude cleanups to Wayland code that no longer has to
care about selection atoms.
2017-12-14 04:39:22 +01:00
Benjamin Otte
65fcff87b2
gdk: Remove ability to request selection notifications
...
Without selections, that's kinda pointless.
2017-12-14 04:20:48 +01:00
Benjamin Otte
f2bb2024c8
gdk: Remove properties
...
They are not used anymore.
Gone with them are PropertyNotify events.
2017-12-14 03:05:34 +01:00
Benjamin Otte
d7f34874ab
x11: Make unsetting transient-for work
...
... and just unset it from GtkWindow instead of fiddling with
properties.
2017-12-14 03:05:34 +01:00
Benjamin Otte
a4b42f0b73
gdk: Remove selection defines
...
And with it, remove the selections section from the docs.
So selections are gone for good now.
2017-12-14 03:05:34 +01:00
Carlos Garnacho
3021edc38d
gdk/x11: s/gdk_event_free/g_object_unref/
2017-12-14 01:05:48 +01:00
Carlos Garnacho
8595e4b1d1
gdk: Figure out the GdkSeat of an event from the GdkDevice
...
Removes the need for gdk_event_set_seat() and the GdkSeat field from
GdkEventPrivate.
2017-12-14 00:58:32 +01:00
Carlos Garnacho
59cab36035
gdk: Fold GdkEventPrivate fields into event structs
...
Now all events structs are private, it doesn't make as much sense
having GdkEventPrivate wrapping allocating events. This is a first
step towards removing it.
2017-12-14 00:58:32 +01:00
Carlos Garnacho
64decbfd74
gdk: Remove GdkEventType argument from GdkEvent union
...
It won't stand true anymore that the GdkEventType argument is the
first field of the GdkEvent* structs. All callers have been updated
to use event->any.type instead.
2017-12-14 00:58:32 +01:00
Carlos Garnacho
b9db0b55cb
gdk: Refurbish GdkEvent struct hierarchy
...
Make all specific event structs contain a GdkEventAny, so the base
struct can be extended without modifying structs all over the place.
2017-12-14 00:58:32 +01:00
Benjamin Otte
54f9aef0d4
gdk: Remove gdk_selection_convert()
...
It's not used anymore.
2017-12-14 00:44:26 +01:00
Benjamin Otte
ca5f859dc8
dnd: Only send DELETE request on X11
...
This is Xdnd-specific and doesn't need to happen elsewhere.
2017-12-13 23:52:55 +01:00
Benjamin Otte
4042d5f242
gdk: Remove ability to own a selection
...
With this, the GDK_EVENT_SELECTION_REQUEST and GDK_EVENT_SELECTION_CLEAR
and the associated GtkWidget signals are gone, too.
2017-12-13 23:39:02 +01:00
Benjamin Otte
b66052f3ce
gdk: Remove gdk_selection_add_targets()
...
It's not needed anymore, now that we can look at the content provider's
formats.
Alose remove all the API in GTK that was used to set it.
2017-12-13 19:27:51 +01:00
Benjamin Otte
65eab87238
x11: Move selection handling to GDK
...
Instead of claiming the selection in GTK, claim it in the X11 dnd code.
Also handle SelectionRequest and SelectionClear X events there.
2017-12-13 18:31:06 +01:00
Benjamin Otte
8648d5409e
dnd: Pass content to gdk_drag_begin()
...
Instead of just passing the GdkContentFormats, we are now passing the
GdkContentProvider to gdk_drag_begin().
This means that GDK itself can now query the data from the provider
directly instead of having to send selection events.
Use this to provide the private API gdk_drag_context_write() that allows
backends to pass an output stream that this data will be written to.
Implement this as the mechanism for providing drag data on Wayland.
And to make this all work, implement a content provider named
GtkDragContent that is implemented by reverting to the old DND
drag-data-get machinery inside GTK, so for widgets everything works just
like before.
2017-12-13 15:05:27 +01:00
Benjamin Otte
fb0fdddd76
x11: Refactor xevent filtering some more
...
We now have a GdkX11Display::xevent signal that gets emitted for every
XEvent and allows you to interrupt processing via TRUE/FALSE return
values.
These return values to correspond to GDK_FILTER_REMOVE and
GDK_FILTER_CONTINUE respectively.
The GDK_FILTER_TRANSLATE case from gdk_window_add_filter() is now meant
to be handled via gdk_display_put_event().
2017-12-13 01:55:56 +01:00
Benjamin Otte
4b33a34ce3
x11: Use GdkX11Display::translate-event more
2017-12-13 01:09:32 +01:00
Benjamin Otte
2d86c1a869
x11: Make clipboard use translate-event signal
2017-12-13 00:56:52 +01:00
Benjamin Otte
0d1ea05658
x11: Add GdkX11Display:translate-event signal
...
This is supposed to replace gdk_window_add_filter() in the long run.
2017-12-13 00:56:52 +01:00
Benjamin Otte
f34297cfba
x11: Constify XEvent usage
2017-12-13 00:56:52 +01:00
Benjamin Otte
8a453924a0
gdk: Remove gdk_event_put(), peek() etc
...
We don't want to treat events like they don't belong to displays. So
instead, people should use gdk_display_put/peek/get_event().
2017-12-13 00:56:52 +01:00
Benjamin Otte
5df527edaf
x11: Refactor code
...
This is in preparation for DND.
It moves a lot of code from gdkclipboard-x11.c to
gdkselectionoutputstream-x11.c to untangle it from GdkX11Clipboard
usage.
2017-12-13 00:56:52 +01:00
Benjamin Otte
643a6c2311
gdk: Remove gdk_drag_manage_dnd()
...
Instead, pass the actions as part of gdk_drag_begin() and insist DND is
always managed.
A new side effect is that gdk_drag_begin() can now return %NULL.
2017-12-11 01:46:33 +01:00
Benjamin Otte
218efa62ef
dnd: Pass dx/dy instead of x_root/y_root
...
This way, we don't need root coordinates when computing the dnd start
position.
2017-12-11 01:02:31 +01:00
Benjamin Otte
803cbd576f
dnd: Introduce gdk_drop_read_async() and use it
...
This is the replacement for selection usage.
Backend implementations for X11 (missing support for backwards compat
formats like COMPOUND_TEXT) and Wayland are included.
GTK code should be adapted to use gdk_drop_read_*() functions instead
of gtk_drag_get_data().
2017-12-10 01:09:14 +01:00
Benjamin Otte
963264a73a
gdk: Fix wrong usage of g_task_propagate_pointer()
...
The return value is transfer full, not transfer none.
2017-12-10 01:09:14 +01:00