Commit Graph

236 Commits

Author SHA1 Message Date
Matthias Clasen
c16a0bd9b7 Drop gdk_display_get_toplevel_windows
Nothing uses this private api anymore, so we can drop it.
2017-11-05 18:39:01 -05:00
Matthias Clasen
8144d31ebe Stop talking about GdkScreen in the docs
This api is going away.
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
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
2d6bd1ae6d Drop gdk_window_get_screen
This includes removing the GdkScreen argument from the
create_window_impl display vfunc.
2017-10-31 17:25:01 -04:00
Matthias Clasen
f9dacd6de0 use the GdkDisplay get_setting vfunc
Instead of calling the GdkScreen implementation, use our
own vfunc now.
2017-10-30 16:44:47 -04:00
Matthias Clasen
61d13b0f14 gdk: Add settings api to GdkDisplay
This commit adds gdk_display_get_setting and a ::setting-changed
signal, which will replace the settings event we use now. Note
that I've done away with the GdkSettingAction argument that the
event has, since we are not using it at all.
2017-10-30 09:21:47 -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
Carlos Garnacho
97139e4027 gdk: Remove remainings of fake crossing event delivery across touch
This was by all lights broken, and is basically an implementation detail
of the X11 backend since the pointer emulating touch just steals the pointer
cursor, so should be reimplemented there.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
f3b0a3780e gdk: Coalesce 2 GdkWindow fields in GdkPointerWindowInfo struct
One used to point to the toplevel and the other to the client-side window
that the pointer pointed to. The latter was made to be like the former in
most places, so put those together, and fix the remaining cases where the
variable might not end up with a toplevel/native window.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
c00567a64c gdk: Remove unused variable
It was supporting API that has been removed.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
0317b0d18d gdk: Remove implicit touch grab accounting
This is not necessary now that there's no client-side windows to track.
The only removed piece that could make sense is emission of grab broken
events, but it's already an stretch since the semantics of those with
multi-touchpoint is unclear.

Anyhow, This should be fixed at the GTK level, while we let GDK deal with
seat/device level grabs.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
44cb3ccfa1 gdk: Remove motion hints
Motion hints are now literally a thing of the past. Everything should be
using the full motion event stream.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
3e1f672170 gdk: Drop generation of synthesized crossing events on grabs
GDK just needs to care about toplevels nowadays, which means these events
are already delivered from the windowing. We don't need to generate
intra-window crossing events ourselves.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
a9988e18b0 gtk: Remove 2BUTTON and 3BUTTON events and event types
Those should be interpreted by widget-local gestures, not guessed at a
high level with no notions of the specific context. Users will want
GtkGestureMultiPress to replace these events.
2017-09-19 18:40:50 +02:00
Daniel Boles
d98a23dc80 GdkDisplay: Call the correct push|pop_error_trap()
It is wrong to assume all Displays are of the same class as the default.

https://bugzilla.gnome.org/show_bug.cgi?id=784016
2017-08-15 20:34:11 +01:00
Daniel Boles
b3ab230aac gdkdisplay: Remove a pointless assignment
https://bugzilla.gnome.org/show_bug.cgi?id=784016
2017-08-06 01:13:51 +01:00
Benjamin Otte
d2c26c471c gdk: Remove attributes_mask from gdk_window_new()
The only remaining values were always treated as 0, so we just hardcode
them to 0.
2016-11-07 01:33:43 +01:00
Benjamin Otte
d028667fc6 display: Actually initialize variables
Forgot to add this in d249e77bcb.
2016-10-29 18:10:26 +02:00
Benjamin Otte
d249e77bcb API: screen: Remove gdk_screen_is_composited()
Switch code to use gdk_display_is_composited() instead.

The new code also doesn't use a vfunc to query the property but rather
requires the backend to call set_composited()/set_rgba() to change the
value.
2016-10-29 04:49:47 +02:00
Benjamin Otte
42d8142cc7 API: gdk: Add gdk_display_is_rgba() and gdk_display_is_composited()
Also add properties for those two properties.

The first property is equivalent to checking if an RGBA visual exists,
the 2nd is equivalent to gdk_screen_is_composited().
2016-10-29 04:49:47 +02:00
Benjamin Otte
cd67c0d7cc window: Add a GdkWindow:display property
... and make it an explicit property of the window struct instead of
looking it up in the visual.
2016-10-28 04:45:35 +02:00
Matthias Clasen
1396d6c92a Remove some more deprecated display API
gdk_display_get_pointer, gdk_display_get_window_at_pointer and
gdk_display_warp_pointer have long been deprecated.
2016-10-25 19:31:24 -04:00
Matthias Clasen
ee7ddefce9 Remove deprecated gdk_display_list_devices 2016-10-25 16:04:01 -04:00
Matthias Clasen
e642909823 Remove deprecated display ungrab functions 2016-10-25 15:56:52 -04:00
Matthias Clasen
5cb3fc4c4f Drop deprecated gdk_display_get_screen 2016-10-25 15:35:44 -04:00
Matthias Clasen
78d0876c46 Remove deprecated gdk_display_get_n_screens 2016-10-25 15:21:46 -04:00
Rico Tzschichholz
16ded8d47b gdk: Remove deprecated {keyboard,pointer}_{grab,ungrab} API 2016-10-24 10:33:11 +02:00
Benjamin Otte
e76ba9a3c3 gdk: Remove gdk_window_set_debug_updates()
The update tracking code was ugly and using deprecated drawing APIs. It
was also in the wrong place.

So instead of trying to keep it working, I'll remove it. We need to find
a better way to put it and make it work there.
2016-10-16 18:18:58 +02:00
Benjamin Otte
89f2e17f91 API: Remove gdk_window_set_composited()
And the related call gdk_display_supports_composite().
2016-10-16 18:17:21 +02:00
Benjamin Otte
579edbbca8 display: Insist that backends implement the monitor vfuncs
We cannot fallback anymore once we remove the ability to query screen
size, and that's about to happen.
2016-10-16 18:17:21 +02:00
Benjamin Otte
76d95c312d display: Don't return NULL in get_primary_monitor()
Nobody ever does a NULL check there so all that causes is crashes. So
we better return a non-primary monitor than NULL.

Fixes gdk-wayland always returning NULL.
2016-10-16 18:17:21 +02:00
Rico Tzschichholz
a3f1596069 Add some missing (nullable) annotations
https://bugzilla.gnome.org/show_bug.cgi?id=771826
2016-09-22 14:02:07 +02:00
Timm Bäder
fbca09ecb4 gdkdisplay: Unref seats in finalize 2016-09-08 11:34:13 +02:00
Emmanuele Bassi
7fe6510800 Silence a compiler warning
Initialize the `nearest` variable.
2016-05-26 12:46:54 +01:00
Matthias Clasen
f39a7ecd63 Remove an unused variable 2016-05-23 14:19:30 -04:00
Olivier Fourdan
d288a134a4 display: Add vfunc for get_monitor_at_window
Some backends (namely Wayland) do not support global coordinates so
using the window position to determine the monitor will always fail on
such backends.

In such cases, the backend itself might be better suited to identify
the monitor a given window resides on.

Add a vfunc get_monitor_at_window() to the display class so that we can
use the backend to retrieve the monitor, if the backend implements it.

https://bugzilla.gnome.org/show_bug.cgi?id=766566
2016-05-18 19:07:27 +02:00
Matthias Clasen
a047269428 Avoid copying an event
Not a big deal, but we can be a bit more efficient when generating
grab-broken events.
2016-05-01 13:26:35 -04:00
Matthias Clasen
b6c4ba0e2a Add a fallback for unconverted backends
If the monitor vfuncs are not implemented in a display class,
fall back to providing a single monitor object representing
the entire screen. This is not meant to be 'good enough', it
is just to provide some implementation until all backends
implement the monitor vfuncs. When that is the case, the
fallback should be removed.
2016-04-27 23:18:16 -04:00
Matthias Clasen
9d719b9989 display: Add new monitor apis
This follows our general direction of moving functionality
from GdkScreen to GdkDisplay.
2016-04-27 23:18:16 -04:00
Paolo Borelli
fa43edd244 gdk: implement gdk_display_list_devices using GdkSeat
Now that the function is factored out in a single place, we can
refactor it to not use deprecated API.
2016-02-29 21:54:01 +01:00
Paolo Borelli
4a6f8a065a gdk: remove the display->list_devices vfunc
gdk_display_list_devices is deprecated and all the backends
implement the same fallback by delegating to the device manager
and caching the list (caching it is needed since the method does
not transfer ownership of the container).
The compat code can be shared among all backends and we can
initialize the list lazily only in the case someone calls the
deprecated method.

https://bugzilla.gnome.org/show_bug.cgi?id=762891
2016-02-29 21:53:58 +01:00
Paolo Borelli
363f9c9571 gdkdisplay: get the pointer device from the default seat
https://bugzilla.gnome.org/show_bug.cgi?id=762820
2016-02-29 14:05:00 +01:00
Matthias Clasen
e0caafbcdf display: Don't change default seat in flight
gdk_display_add_seat was prepending new seats to the list, which
was effectively making the added seat the new default. Since that
is probably not intended, append to the list.
2016-02-28 12:31:20 -05:00
Paolo Borelli
72b40266bd gdkwindow: cleanup, avoid direct access to display members 2016-02-28 18:22:42 +01:00
Matthias Clasen
f749152efe Fix a copy-paste error 2016-02-25 20:12:53 -05:00
Carlos Garnacho
3e1e02c2bc GdkDisplay: Add a few ignore deprecations statements around GdkDeviceManager
There's places where we still need to deal with floating devices, which are
unseen by seats. Ignore deprecations and keep using GdkDeviceManager until
we can forget about floating devices.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
644fa138c3 GdkDisplay: Iterate through seats' pointers/keyboards in older grab functions
Instead of using the GdkDeviceManager.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
4065bd1e96 gdk: Deprecate GdkDeviceManager and gdk_device_grab/ungrab()
GdkSeat is now the preferred way to deal with input devices and grabs.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00