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
437d70f569
gdk: Get rid of owner change events
...
They're unused now.
2017-12-03 05:46:49 +01:00
Benjamin Otte
134076e738
x11: Implement claiming the X Selection with the clipboard
...
... and of course support writing to other apps.
2017-12-03 05:46:47 +01:00
Benjamin Otte
c66a61d896
x11: Add gdk_x11_display_get_max_request_size()
...
There's multiple places in the clipboard code where I need it, so make
it a custom function.
2017-12-03 05:46:47 +01:00
Benjamin Otte
fe9045d82e
x11: Various clipboard cleanups
...
(1) Turn X11 clipboard event handling into a regular filter function
(2) Maintain a timestamp in the clipboard, so we can pass it when
querying selections.
2017-12-03 05:43:24 +01:00
Benjamin Otte
4728dd0a9e
x11: Add an initial clipboard implementation
...
This does nothing but download the targets and debug-print them.
2017-12-03 05:43:24 +01:00
Matthias Clasen
bad53bc201
x11: Stop deriving from GdkDeviceManager
...
We can just derive from GObject.
2017-11-25 11:04:15 -05:00
Matthias Clasen
aae4fafad2
x11: Stop using gdk_display_get_device_manager
...
We can keep the displaymanager in the backend.
2017-11-25 11:04:14 -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
dbb18ad5d8
gdk: Add a private method to get a server timestamp
...
This is needed in the clipboard code. We don't make
it public, since that code is destined to eventually
live in gdk anyway.
2017-11-17 15:39:08 -05:00
Matthias Clasen
8ced2c6478
x11: Stop using GdkScreen altogether
...
Derive GdkX11Screen directly from GObject, and
remove the last remaining uses of GdkScreen.
2017-11-17 10:51:55 -05:00
Matthias Clasen
2daa7d1a53
x11: Stop using GdkScreen in api
...
This type is going away, so switch to using GdkX11Screen
everywhere.
2017-11-17 10:51:55 -05:00
Matthias Clasen
abb1d59d4e
Stop calling _gdk_screen_close
...
It does nothing useful, and is going away.
2017-11-17 10:51:55 -05:00
Matthias Clasen
6e94be3f50
Drop the error trap vfuncs
...
No longer used.
2017-11-17 00:08:24 -05:00
Matthias Clasen
d73898437f
x11: Add gdk_x11_display_set_program_class
...
The program class is a very X-specific concept.
There should be x11-backend api to deal with it.
2017-11-16 23:21:06 -05: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
Matthias Clasen
5f73afae3d
x11: Remove mentions of GDK_WINDOW_ROOT
...
This backend never creates a window of this type, so no
need to check for it anymore.
2017-11-13 16:47:50 -05:00
Matthias Clasen
964cdaf3a3
x11: Stop creating a root window
...
We no longer need it.
2017-11-13 16:39:54 -05:00
Matthias Clasen
5999b1c73a
x11: Store toplevel list in GdkDisplay
...
This will let us get rid of the root window.
2017-11-13 16:32:34 -05:00
Matthias Clasen
8af666cb4f
x11: Remove another use of the root window
...
We just need the X root window here.
2017-11-13 16:09:47 -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
063db3630b
x11: Stop using gdk_display_get_root_window
...
Use the backend api for this.
2017-11-05 21:45:51 -05:00
Matthias Clasen
5db2352eba
x11: Make gdk_x11_display_get_root_window available
...
This will replace the frontend api of the same name.
2017-11-05 21:45:51 -05:00
Matthias Clasen
76b6d86659
x11: Add a helper to get all toplevels
...
This will let us avoid frontend API for this task.
2017-11-05 18:33:56 -05: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
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
f33c20920b
x11: Add API to query root window and screen from GdkDisplay
2017-11-02 12:42:16 +01: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
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
047eac5a96
x11: Add backend api to get the screen
...
gdk_display_get_default_screen is gone, but we still
have x11-specific screen apis that GTK+ is using, so
we need an alterative way to get the screen object.
2017-11-01 19:44:28 -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
Matthias Clasen
e3daf986ca
x11: Stop using gdk_display_get_default_screen
...
There's no point in using this api here, we can directly
get the screen member from the GdkX11Display struct.
2017-11-01 19:44:28 -04:00
Benjamin Otte
bd6b6ed93c
gdk: Remove VisibilityNotify events
2017-11-01 22:00:34 +01:00
Benjamin Otte
161f891d55
x11: Make gdk_x11_display_open() public API
...
People should be able to explicitily open displays to their backends.
2017-11-01 15:48:00 +01:00
Matthias Clasen
463fba18a6
Port to gdk_display_get_root_window
...
This is the replacement for the GdkScreen api of the same name.
2017-10-31 21:27:24 -04:00
Matthias Clasen
5cb5bdf1bc
Add gdk_display_get_toplevel_windows
...
This is replacing the corresponding GdkScreen api, which
is going away. To implement this, we need to add a
get_root_window vfunc to GdkDisplay.
2017-10-31 20:29:48 -04:00
Matthias Clasen
19157c5bf4
x11: Implement the GdkDisplay get_setting vfunc
...
Just call the GdkScreen vfunc.
2017-10-30 16:44:18 -04:00
Timm Bäder
63eb3517be
GdkDisplay: Add a private _emit_opened
...
So we don't have to use the slower g_signal_emit_by_name in startup
paths.
2017-10-10 09:49:35 +02:00
Benjamin Otte
43c212ac28
build: Enable -Wswitch-enum and -Wswitch-default
...
This patch makes that work using 1 of 2 options:
1. Add all missing enums to the switch statement
or
2. Cast the switch argument to a uint to avoid having to do that (mostly
for GdkEventType).
I even found a bug while doing that: clearing a GtkImage with a surface
did not notify thae surface property.
The reason for enabling this flag even though it is tedious at times is
that it is very useful when adding values to an enum, because it makes
GTK immediately warn about all the switch statements where this enum is
relevant.
And I expect changes to enums to be frequent during the GTK4 development
cycle.
2017-10-06 21:23:39 +02:00
Georges Basile Stavracas Neto
0bdaebef1e
window: Improve detection of edge constraint support
...
Instead of relying on special values of edge constraints, this
patch adds an internal-only gdk_window_supports_edge_constraints()
function that by default returns FALSE, and is implemented by
GdkWindowWayland and GdkWindowX11.
This way, we can properly detect server-side support for this
feature and adapt accordingly.
https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-09-17 23:16:48 -03:00
Georges Basile Stavracas Neto
03204f8cdb
x11: Add support for _GTK_EDGE_CONSTRAINTS atom
...
Following the previous patch, where edge constraints support
was added to the Wayland backend, this patch introduces the
necessary code to handle the _GTK_EDGE_CONSTRAINTS atom from
X11 backend.
https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-09-17 23:16:48 -03:00
Emmanuele Bassi
278e54b88d
gdk: Make more private functions static
...
These symbols are not exported and are local to their compilation unit.
2017-04-28 23:03:10 +01:00
Benjamin Otte
d54117024c
x11: Add call to XInitThreads()
...
The Mesa Vulkan drivers need XInitThreads() being called, because their
implementation has to use threads.
And I don't want to make the call depend on if Vulkan is compiled in
because that makes GTK's X11 behavior depend on compile-time flags, so
it's always called.
2017-01-12 02:01:07 +01:00
Matthias Clasen
3dd4f76703
Rename GDK_WINDOWING_VULKAN
...
The WINDOWING defines are only for GDK backends, really.
Define GDK_RENDERING_VULKAN instead.
2016-12-09 14:11:37 -05:00
Benjamin Otte
6d1d6e6792
vulkan: Add more infrastructure
...
gdk_window_create_vulkan_context() now exists and will return a Vulkan
context for the given window. It even initializes the surface. But it
doesn't do anything useful yet.
2016-12-09 18:35:51 +01:00
Benjamin Otte
2a27b7ecc6
API: Remove gdk_window_process_all_updates()
...
It's completely unused since we have a frame clock.
2016-11-23 19:10:34 +01:00
Benjamin Otte
3b93773add
API: gdk: Add gdk_window_new_temp()
...
Your one stop shop for all those nasty hidden input-only windows.
2016-11-07 01:03:17 +01:00
Benjamin Otte
fe08641205
x11: Maointin window visuals without GdkVisual
...
That way, we don't need a GdkScreen to create a GdkWindow anymore.
2016-11-03 23:54:39 +01:00
Benjamin Otte
0192f93689
x11: Replace gdk_display_get_window_visual()
...
... with functions that don't use GdkVisual.
A small step towards getting rid of GdkVisual.
2016-11-03 22:40:36 +01:00