Christophe Fergeau
9259ca98f3
wayland: Fix indentation of previous commit
2017-11-29 12:21:19 +01:00
Christophe Fergeau
ff3da0818c
wayland: emit GDK_SELECTION_CLEAR on owner changes
...
The wayland backend currently never emits GDK_SELECTION_CLEAR events.
GtkClipboard uses this signal in order to clear the clipboard owner when
the selection is set to something outside the application.
This commit ensures the wayland backend emits GDK_SELECTION_CLEAR before
setting the clipboard owner to NULL, as this means we lost the
selection.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=790031
2017-11-29 11:29:30 +01:00
Christophe Fergeau
93f6f253ea
wayland: Remove unused data structure
...
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=790031
2017-11-29 11:29:29 +01:00
Carlos Garnacho
7decad177c
gdk/wayland: Emit GdkSeat::device-added/removed
...
Those were never sent in this backend...
2017-11-27 19:51:38 +01:00
Matthias Clasen
b8c58f41b6
wayland: Don't provide gsetting if dconf is not available
...
This makes gtk+ fall back to reading ~/.config/gtk-3.0/settings.ini
on systems with Wayland, but without dconf (do those exist?).
https://bugzilla.gnome.org/show_bug.cgi?id=790201
2017-11-26 19:40:28 -05:00
Matthias Clasen
1884558470
wayland: Drop GdkWaylandDeviceManager
...
This object had no functionality left.
2017-11-25 11:04:15 -05:00
Matthias Clasen
da8bcc7ed9
wayland: Stop deriving from GdkDeviceManager
...
We can just derive from GObject.
2017-11-25 11:04:15 -05:00
Matthias Clasen
fd958939be
Drop the GdkDeviceManager::display property
...
Move this to the backends, and stop deriving
from GdkDeviceManager.
2017-11-25 11:04:15 -05:00
Matthias Clasen
0ec491ea9d
Drop the get_client_pointer vfunc
...
There is no api using this anymore.
2017-11-25 11:04:15 -05:00
Matthias Clasen
b6a634fe38
Drop the list_devices vfunc
...
We no longer have api that uses this.
2017-11-25 11:04:15 -05:00
Matthias Clasen
efbcb38fdf
wayland: Stop emitting devicemanager signals
...
Nobody is listening to these signals anymore.
2017-11-25 11:04:15 -05:00
Matthias Clasen
639d93687f
wayland: Stop using display->device_manager
...
We can keep the device manager in the backend.
2017-11-25 11:04:14 -05:00
Benjamin Otte
1a70ca75e8
gdk: Sanitize GdkContentFormats API
...
Make sure the API reflects the idea that GdkContentFormats is a set
containing mime types. In particular, treat the object itself as a
plural - it's named content format`S' after all - and therefor use
the correct verb form.
Also make GdkContentFormats keep an array instead of a list, now that
it's immutable.
2017-11-20 23:15:11 +01:00
Benjamin Otte
fc2ce5a925
gdk: Make GdkContentFormats immutable
2017-11-20 23:13:10 +01:00
Benjamin Otte
d6a209816b
gdkdnd: Make GdkDragContext->formats a GdkContentFormats
...
Instead of it being a GList of GdkAtoms.
2017-11-20 23:12:33 +01:00
Matthias Clasen
315db6d505
wayland: Intern signal names
2017-11-17 23:22:02 -05:00
Matthias Clasen
4dc4db56dc
wayland: Intern settings keys
2017-11-17 22:47:49 -05:00
Matthias Clasen
c2f6208ce5
Add private api for setting cursor theme
...
This is implemented in multiple gdk backends,
and we can avoid and ugly ifdef cascade in gtk
by adding a vfunc for this.
2017-11-17 17:42:12 -05:00
Matthias Clasen
fc0f7dc217
Remove gdkprivate.h
...
This is one-too-many private headers. Move the few
declarations here to gdkinternals.h.
2017-11-17 00:34:04 -05:00
Matthias Clasen
3f0d42f74b
Stop including gdkmain.h
...
It is empty now.
2017-11-17 00:16:09 -05:00
Matthias Clasen
6e94be3f50
Drop the error trap vfuncs
...
No longer used.
2017-11-17 00:08:24 -05:00
Matthias Clasen
49f3d86c84
wayland: Stop using gdk_get_program_class
...
This is an abuse, at best. If we need to pass the
app id down here, lets pass the app id.
2017-11-16 23:18:03 -05:00
Benjamin Otte
e9629a5149
wayland: Fix initial cursor
...
Make sure the initial cursor isn't random which would happen due to an
early exit when cursor == pointer->cursor triggered because both were
NULL.
2017-11-15 19:07:17 +01:00
Benjamin Otte
4c4e914806
gdk: Replace GDK_NONE with NULL
2017-11-15 19:07:17 +01:00
Benjamin Otte
cb941956d3
gdk: Turn GdkAtom into a const char *
...
Instead of an integer, it is now a char pointer. We also use
g_intern_string() instead of doing the interning ourselves.
2017-11-15 19:07:17 +01:00
Benjamin Otte
fb94f79094
selection: Remove #ifdef WAYLAND
...
Instead, turn the functions into backend API:
gdk_broadway_display_add_selection_targets()
gdk_broadway_display_clear_selection_targets()
Remove the old per-backend functions, too.
2017-11-15 19:07:16 +01:00
Benjamin Otte
ed1b6a9bed
gdkwindow: Remove event_mask arguments from constructors
2017-11-13 23:41:38 +01:00
Matthias Clasen
73a3d4b785
wayland: Drop an unused function
...
We no longer create a root window, so need to have
a function for it.
2017-11-07 07:43:09 -05:00
Matthias Clasen
6261f5f7b8
wayland: Drop the root window
...
We can just keep a list of toplevels in the display.
2017-11-06 18:52:37 -05:00
Matthias Clasen
20fab69c38
Drop gdk_display_get_root_window
...
This is no longer used.
2017-11-05 21:45:51 -05:00
Matthias Clasen
2eb78a2374
wayland: Stop using gdk_display_get_root_window
...
We can just use the display field directly.
2017-11-05 19:44:39 -05:00
Matthias Clasen
909330f347
wayland: Fix animated cursors
...
We must reset the image delay when stopping the timeout,
otherwise the code setting it up thinks it is still running.
This fixes cursor animation only working for the very first
enter of a widget with an animated cursor, as seen in the
cursors example in gtk4-demo.
2017-11-05 11:27:06 -05:00
Benjamin Otte
e484af8e96
wayland: Fix embarassing bug
...
Yes, I did not get to test this code path until now. Because nobody uses
icon surfaces, boo!
2017-11-05 00:07:18 +01:00
Benjamin Otte
7e137b2524
gdk: Use G_N_ELEMENTS() when iterating over constant arrays
...
And do that everywhere.
Because if we don't, we're gonna crash sometimes.
2017-11-05 00:07:18 +01:00
Benjamin Otte
d092e8dd78
gdk: Fix fallback names for the help cursor
2017-11-05 00:07:18 +01:00
Benjamin Otte
9323d098a6
gdk: Cursors no longer have a display
...
Change constructors to reflect that.
While doing so, also add a fallback argument to the cursor constructors,
so it is now possible to create cursors with fallback.
2017-11-04 00:07:13 +01:00
Benjamin Otte
4e7a056777
gdk: Cursors are created generically
...
There are no longer subclasses for cursors now.
2017-11-04 00:07:13 +01:00
Benjamin Otte
ec824b9e50
wayland: Redo cursor handling
...
This is in line with the X11 changes last patch.
2017-11-04 00:07:13 +01:00
Benjamin Otte
5adf21a17d
cursor: Turn new_from_surface() into new_from_texture()
...
Also turn all the arguments into read-only properties on the GdkCursor
object.
2017-11-04 00:07:13 +01:00
Benjamin Otte
81c2bebaca
gdk: Remove ability to download a cursor
2017-11-04 00:07:13 +01:00
Benjamin Otte
8ba9ae6012
gdk: Add gdk_cursor_get_name()
...
Also add the GdkCursor::name property.
2017-11-04 00:07:13 +01:00
Benjamin Otte
a1759a0a52
gdk: Get rid of GdkCursorType
...
Now that we no longer have API that uses cursor types, don't keep them
around.
2017-11-04 00:07:13 +01:00
Benjamin Otte
9c98adcd15
gdk: Remove GdkWindow.set_device_cursor() vfunc
...
That one calls through to GdkDevice.set_window_cursor(), so let's just
use that one.
2017-11-02 12:42:58 +01:00
Matthias Clasen
6ba48bd0d8
Drop foreign window checks in Wayland
...
The wayland backend never creates foreign windows,
so no need to check for this type of window.
2017-11-01 22:55:27 -04:00
Matthias Clasen
5bd8884bf8
Stop providing the owner in GdkEventOwnerChange
...
This information is rarely useful, and it is one
of the last places where we create foreign windows.
2017-11-01 22:53:24 -04:00
Matthias Clasen
3a5b478e0f
wayland: Some cursor cleanups
...
Remove methods that are not used.
2017-11-01 22:35:19 -04:00
Matthias Clasen
c958818631
Some forgotten cleanups
2017-11-01 21:53:50 -04:00
Matthias Clasen
2a60928157
t Remove gdk_cursor_new_for_display
...
The preferred api to create cursors is by name, and the
GdkCursorType enumeration can directly trace its ancestry
to the horrible X cursor font. So lets stop using it.
2017-11-01 21:49:05 -04:00
Matthias Clasen
0f9e9a9ec2
wayland: No more screen
...
This gets rid of the GdkWaylandScreen object and all
remnants of GdkScreen in the wayland backend.
2017-11-01 19:44:29 -04:00
Matthias Clasen
7f0b5297c6
Drop gdk_display_get_default_screen
...
Also remove the backend implementations.
This api is no longer used.
2017-11-01 19:44:28 -04:00