Commit Graph

2537 Commits

Author SHA1 Message Date
Matthias Clasen
712a5d4f25 Get rid of GdkSurfaceImpl
We don't need the complicated wrapper system anymore,
since client-side windows are gone. This commit moves
all the vfuncs to GtkSurfaceClass, and changes the
backends to just derive their surface implementation
from GdkSurface.
2019-05-28 20:25:14 +00:00
Matthias Clasen
d2951d3aac Rename surface constructors
We want to use a gdk_surface_new_popup for popups,
and align the constructor names with the surface
types, so rename

gdk_surface_new_popup -> gdk_surface_new_temp
gdk_surface_new_popup_full -> gdk_surface_new_popup

The temp surface type will disappear eventually.
2019-05-28 20:25:14 +00:00
Matthias Clasen
47fb092393 gdk: Drop GdkWindowAttr
All the information in it is already contained
in the surface object we pass along, and none
of the backend implementations were using the
attributes at all.
2019-05-28 20:25:14 +00:00
Matthias Clasen
2855729cb4 gdk: Drop input-only surfaces
We are not creating such surfaces anymore, and
they were only ever meaningfully implemented
on X11. Drop the concept, and the api for determining
if a surface is input-only.
2019-05-28 20:25:14 +00:00
Matthias Clasen
7c1509feaa x11: Stop using gdk_surface_new_temp
We can just as well use gdk_surface_new_popup.
2019-05-28 20:25:14 +00:00
Matthias Clasen
f692974e5a gdk: Remove remnants of client-side windows
Now that all surfaces are native, we don't need
to separately keep track of grab surfaces and
their native ancestor anymore.
2019-05-28 20:25:14 +00:00
Matthias Clasen
48b522c487 x11: Drop a gratitious use of gdk_event_get_root_coords
We are in the backend, so we can do the translation ourselves.
2019-05-28 20:25:14 +00:00
Matthias Clasen
9b54f124e5 surface: Simplify destroy implementation
Without child surfaces, there is no need to recurse.
2019-05-28 20:25:14 +00:00
Matthias Clasen
0f5a6a3927 surface: Small cleanup
Every surface has an impl now, no need to check.
2019-05-28 20:25:14 +00:00
Matthias Clasen
6183d58f80 x11: Stop using surface->parent
It is always NULL.
2019-05-28 20:25:13 +00:00
Matthias Clasen
989792cbc0 Drop child surfaces
Drop gdk_surface_child_new and the child surface type,
since we no longer use them. Deprecate surface apis
that only make sense with child surfaces.
2019-05-28 20:25:13 +00:00
Matthias Clasen
68e5456db9 x11: Stop using child surface api
We no longer have child surfaces.
Drop code that only makes sense in
that case.
2019-05-28 20:25:13 +00:00
Matthias Clasen
0a217cdd39 x11: Remove to unused settings
We no longer have settings for gtk-button-images
or gtk-menu-images.
2019-05-19 17:12:37 -04:00
Matthias Clasen
33ffd54d5f Redo frame profiling
We were adding incomplete frame timings to the
profile, which lead to occasional nonsense
numbers. Instead, only add timings to the profile
once we marked them as complete. This also
gives us an opportunity to add the presentation
time as a marker.
2019-05-16 19:08:34 +00:00
Carlos Garnacho
58cfafdf04 gdk/x11: Remove XI1 remnant
This header is not referenced anywhere.
2019-05-15 01:10:08 +02:00
Carlos Garnacho
c2d92794e2 gdk/x11: Drop GdkDeviceManagerCore
Keep only the XInput2 device manager, which handles "modern" stuff
like scroll and touch.
2019-05-15 01:05:29 +02:00
Carlos Garnacho
33642e2255 gdk/x11: Make XInput2 a mandatory runtime dependency for x11
Besides requiring it at build time, require that the server the client
is running against exposes the XInput2 protocol. We no longer fallback
on a device manager for core events.
2019-05-15 01:05:20 +02:00
Carlos Garnacho
c4446d36de gdk/x11: Drop GDK_CORE_DEVICE_EVENTS environment variable
Support for core events will be discontinued, so this doesn't make sense
anymore.
2019-05-15 01:05:20 +02:00
Carlos Garnacho
c4cf72ecb8 gdk/x11: Remove gdk_disable_multidevice()
Core events will be discontinued, so this call is meaningless now.
2019-05-15 01:05:20 +02:00
Carlos Garnacho
f3250172a4 gdk/x11: Make XInput2 a mandatory build time dependency for x11
XInput2 is more than a decade old already, and the input improvements
there (and in every other backend really) make it untenable to have
support for X11 core input events dragging things behind.
2019-05-15 01:05:20 +02:00
Benjamin Otte
7ae675b469 build: Install the backend headers in the backend directories
That's where they are in the sources and we include them from other
headers. So make sure the directories match.
2019-05-06 20:14:53 +02:00
Matthias Clasen
f6225901e8 gdk: Documentation improvements
Document some new x11 symbols.
2019-05-02 02:39:36 +00:00
Rico Tzschichholz
724ec3ca92 Add a few placeholder documentation block to have g-i annotations 2019-05-01 15:03:16 +02:00
Samuel Thibault
99eee5cea9 Revert "gdk: deactivate/activate surface on keyboard grabs"
This reverts commits 35417a5a74 and
01455399e8.

This reintroduces #85, but see discussion in
https://gitlab.gnome.org/GNOME/gtk/merge_requests/433 for the unforeseen
invasive consequences of these commits.
2019-04-30 16:48:16 +02:00
Matthias Clasen
51b2759eb1 surface: Drop group api
This was only ever implemented on X11, and
GTK is not using it at all. Relegate it to
x11-specific api.
2019-04-20 02:28:46 +00:00
Matthias Clasen
fed2db1493 window: Drop some x11-specific apis
The skip-taskbar, skip-pager and urgency hints were
only ever implemented for X11, and are not very useful
with modern desktops. Relegate the functionality to
x11 backend api, and drop the GtkWindow api.
2019-04-20 02:28:46 +00:00
Benjamin Otte
0791924bf7 Convert fallthrough comments to G_GNUC_FALLTHROUGH
This way it's very obvious that fallthrough is indeed what we want.

Also bump the glib requirement to 2.59 which introduced
G_GNUC_FALLTHROUGH.
2019-04-15 14:40:25 +02:00
Matthias Clasen
64fd5158bf gdk: Change some async dnd api
The pattern we generally follow is to put the
async result right after the source object, in
finish functions. Do this for gdk_drop_read_finish.
2019-04-02 15:11:06 +00:00
Matthias Clasen
8e4e4401c5 gdk: Change some async clipboard api
The pattern we generally follow is to put the
async result right after the source object, in
finish functions. Do this for gdk_clipboard_read_finish.
2019-04-02 15:10:53 +00:00
Matthias Clasen
8ef4e231ec gdk: Stop implementing set_role
All but the X implementation of these were
empty anyway. And the X one is just setting
a property.
2019-03-27 17:29:17 -04:00
Matthias Clasen
03eb455c93 Rename gdk_device_get_position_double
We can drop the double suffix now.
2019-03-26 18:12:55 -04:00
Matthias Clasen
8dece0e940 gdk: Stop using gdk_device_get_position
We should always use the double variant of this api.
2019-03-26 18:12:55 -04:00
Matthias Clasen
21580309d3 Rename gdk_surface_get_device_position_double
Drop the _double suffix, now that the int version is gone.
2019-03-26 18:12:54 -04:00
Matthias Clasen
d45996c728 Avoid root coordinates in begin_drag/move apis
Change the all the begin_drag and begin_move apis in
GdkSurface and GtkWindow to expect surface coordinates.

Update the x11 implementation to translate to root
coordinates where it matters. Wayland is ignoring the
coordinates anyway.
2019-03-26 15:57:11 -04:00
Matthias Clasen
3d37f08f38 Remove gdk_device_warp
This was only ever implemented on X11, and is
not something we want to encourage apps to do, ever.
2019-03-24 20:49:08 -04:00
Matthias Clasen
eacbeb9efd x11: Don't emit GDK_NOTHING events
They are good for nothing.
2019-03-06 23:42:36 -05:00
Matthias Clasen
08badd23cd Drop some dead code
There were some internal uses of GdkEventFunc. Thankfully,
they were unused, so lets just drop them.
2019-02-23 14:13:57 -05:00
Emmanuele Bassi
22f073b57b docs: Fix references to pkg-config files
The pkg-config files for GDK were dropped in 4.0, and now the GTK
pkg-config files have been renamed.
2019-02-06 10:40:51 +01:00
Emmanuele Bassi
45361e19c3 Rename more GSources to use gtk 2019-02-06 10:37:24 +01:00
Matthias Clasen
101f1c7b42 gdk: Stop using deprecated pango api 2019-02-04 18:28:31 -05:00
Benjamin Otte
359bc7695c build: Reintroduce warning flags from autotools
Some of the flags got lost in the meson transition or were demoted from
error flags to warning flags.
This commit reintroduces them.

It also includes fixes for the code that had warnings with those flags.
The big one being -Wshadow.
2019-01-22 04:33:12 +01:00
Matthias Clasen
a80007ac12 Fix XChangeProperty calls
They must be long...

Closes: #1556
2019-01-02 19:26:56 -05:00
Peter Hutterer
38cba6895a x11: make the tool lookup dependent on the hw id as well
Tools on the same physical item have the same serial number, so the eraser
and the pen part of a single pen share that serial number. With the current
lookup code, we'll always return whichever tool comes first into proximity.

Change the code to use the hw id in addition to the serial number, this way we
can differ between two tools.
2018-12-18 21:41:49 +01:00
Peter Hutterer
e95e045898 x11: don't add unknown tools to our list
Generic tools (Bamboo, built-in tablets) always have the same serial number
assigned by the wacom driver. This includes the touch tool when the wacom
driver handles the touch evdev node (common where users require the wacom
gestures to work).

When the first device is the touch device, a tool is created with that serial.
All future tools now return the touch tool on lookup since they all share the
same serial number. Worse, this happens *across* devices, so the pen
event node gets assigned the touch tool because they all have the same serial.

Since we don't actually care about the touch as a tool, let's skip any unknown
tool. This captures pads as well.
2018-12-18 21:41:09 +01:00
Peter Hutterer
1b730dcf31 x11: get the tool type from the wacom driver properties
Any wacom device currently sets the tool type to UNKNOWN. The wacom driver has
a property that exports the tool type as one of stylus, eraser, cursor, pad or
touch. Only three of those are useful here but that's better than having all
of them as unknown.
2018-12-18 21:41:08 +01:00
Timm Bäder
94745241c2 GdkGLContext: Fix damage computation with buffer_age
As per the spec:

> The back buffer can
> either be reported as invalid (has an age of 0) or it may be
> reported to contain the contents from n frames prior to the
> current frame.

So a  buffer age of 1 means that the buffer was used in the last frame.
We were handling buffer_age==1 the same as buffer_age==0, i.e. we
returned the full damage for the surface.

[1] https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_buffer_age.txt
2018-12-02 13:25:43 +01:00
Christoph Reiter
b061821f24 g-i: Add some nullable annotations
Based on grepping arg docs for NULL.
See https://gitlab.gnome.org/GNOME/pygobject/issues/261
2018-11-18 13:36:50 +01:00
Mohammed Sadiq
1ce960c85b gdkselectioninputstream-x11: Fix memory leak 2018-09-16 20:08:25 +05:30
Benjamin Otte
375fbd4e47 gdk: Remove key_event->string and key_event->length
They're unused.
2018-07-30 19:32:38 +02:00
Matthias Clasen
ad6255a841 Merge branch 'xfixes-timestamp' into 'master'
x11: Ignore old XFixesSelectionNotify events

Closes #14

See merge request GNOME/gtk!259
2018-07-25 11:21:01 +00:00