Commit Graph

9510 Commits

Author SHA1 Message Date
Matthias Clasen
1de7440c8c Merge branch 'gdk-cleanups' into 'master'
Gdk cleanups

Closes #2790

See merge request GNOME/gtk!2553
2020-09-10 20:21:12 +00:00
Matthias Clasen
2113f98c5c gdk: Don't create surfaces of size 0x0
Don't pass 0x0 as size when calling gdk_surface_new().
The Wayland backend takes us literally, and we end
up with a surface that (temporarily) has these
dimensions, confusing other APIs that we pass the
size to, such as Vulkan.
2020-09-10 13:56:44 -04:00
Matthias Clasen
b9d4654fca vulkan: Fix swapchain creation
We end up with a surface that has size 0x0 at the
time we create the Vulkan context, and that is a
size that Vulkan doesn't like, so ensure we request
at least 1x1.

Fixes: #3147
2020-09-10 13:55:16 -04:00
Matthias Clasen
d5d4af585d gdk: Move GdkSurfaceEdge to the right header
This is only used in gdktoplevel.h, so move it there.
2020-09-10 00:44:05 -04:00
Matthias Clasen
93078e52c0 gdk: Rename GdkSurfaceState to GdkToplevelState
That is what it is.

Fixes: #2790
2020-09-10 00:39:03 -04:00
Matthias Clasen
cee275980a gdk: Move GdkSurfaceState to the right header
This is really a toplevel state, so move it
to that header.
2020-09-10 00:25:51 -04:00
Matthias Clasen
b3aa5ad4f9 Move GdkFullscreenMode to the right header
This enum is just used for a GdkToplevel property now,
so move the declaration to the gdktoplevel.h header.
2020-09-10 00:22:26 -04:00
Chun-wei Fan
b322ddba5c gdksurface-win32.c: Fix missed include
We need to include gdkdevice-win32.h for gdksurface-win32.c
2020-09-04 17:24:57 +08:00
Matthias Clasen
ccb447da02 Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master

Closes #2777

See merge request GNOME/gtk!2503
2020-08-31 16:30:21 +00:00
Julien Ropé
665955b81e Fix resource leak in gdk_display_close() under Wayland
When using the gdk_display_close(), the handle to the Wayland compositor was not released. This could cause the consumption of all available handles, preventing other processes from accessing the display.

Fixing this by calling wl_display_disconnect() when releasing the GdkWaylandDisplay object.

Signed-off-by: Julien Ropé <jrope@redhat.com>
2020-08-31 17:46:18 +02:00
Timm Bäder
b0d89b1882 wayland: Fix a GSettingsSchema leak 2020-08-29 16:46:28 +02:00
Timm Bäder
53eed09e08 gdkcairoprivate: Fix header guard 2020-08-29 11:11:29 +02:00
Matthias Clasen
78134fc6d3 Add a function to request motion events
We want to ensure that the pointer position is reflected
when widget geometry changes, so add a function that tells
GDK "please create a motion event at the current position
on this surface, if one doesn't happen already".
2020-08-27 13:33:45 -04:00
Matthias Clasen
dd0c43b7ba Don't export gdk_surface_constrain_size
It has one last use in gtkwindow.c, but that will
go away and doesn't need this function to be exported
anyway.
2020-08-27 07:31:45 -04:00
Matthias Clasen
81e113d8aa Merge branch 'wip/carlosg/shuffle-font-mouse-settings' into 'master'
Look up font and mouse settings in gsettings-desktop-schemas

See merge request GNOME/gtk!2489
2020-08-27 00:08:45 +00:00
Alexander Mikhaylenko
0a59429dc8 wayland: Fix dnd hotspot movement
_gdk_wayland_surface_offset_next_wl_buffer() moves the surface relatively
to its current position, pass it a delta instead of new position.
2020-08-27 04:04:48 +05:00
Carlos Garnacho
6421355065 gdk/wayland: Use double-click/drag-threshold settings from g-d-s
Handle both these settings, and the older settings-daemon ones for
backwards compatibility. The keys are already checked for existence
in the schema, so it will just use the existing ones.
2020-08-27 00:27:50 +02:00
Carlos Garnacho
536966e848 gdk/wayland: Look for font settings in gsettings-desktop-schemas
Prefer this location, but also look for the old location in
settings-daemon for backwards compatibility. This applies to both
direct settings lookups and via the settings portal.
2020-08-27 00:18:09 +02:00
Matthias Clasen
1c44910dfe gdk: Drop an unused vfunc 2020-08-26 18:09:47 -04:00
Matthias Clasen
bf9bb71813 gdk: Cosmetics 2020-08-26 17:56:41 -04:00
Matthias Clasen
75915bc782 broadway: Fix up surface_at_position 2020-08-26 17:56:41 -04:00
Matthias Clasen
618891a41a win32: Fix return value of get_device_state
We need to look a the position, not the child surface.
2020-08-26 17:56:41 -04:00
Matthias Clasen
0d82fcf76f wayland: Drop unused argument from query_state
Now that this is backend-only api, we can just
drop unused arguments.
2020-08-26 17:56:41 -04:00
Matthias Clasen
0091de63b4 wayland: Fix return value of get_device_state
We need to look a the position, not the child surface.
2020-08-26 17:56:41 -04:00
Matthias Clasen
338d6adb10 broadway: Drop unused argument from query_state
Now that this is backend-only api, we can just
drop unused arguments.
2020-08-26 17:56:41 -04:00
Matthias Clasen
c4c155d698 broadway: Fix return value of get_device_state
We need to look a the position, not the child surface.
2020-08-26 17:56:41 -04:00
Matthias Clasen
b9016229c1 x11: Drop unused argument from query_state
Now that this is backend-only api, we can just
drop unused arguments.
2020-08-26 17:56:41 -04:00
Matthias Clasen
cf257e6676 x11: Fix return value of get_device_state
We need to look a the position, not the child surface.
2020-08-26 17:56:41 -04:00
Matthias Clasen
62ed769e74 gdk: Drop the query_state vfunc
It is no longer used.
2020-08-26 17:56:41 -04:00
Matthias Clasen
f3a0357ab0 x11: Stop setting the query_state vfunc 2020-08-26 17:56:41 -04:00
Matthias Clasen
1d8ac79296 win32: Stop using the query_state vfunc 2020-08-26 17:56:41 -04:00
Matthias Clasen
374c776749 macos: Stop setting the query_state vfunc 2020-08-26 17:56:41 -04:00
Matthias Clasen
8c9e1e7444 wayland: Stop using the query_state vfunc
Just call the backend implementation directly.
2020-08-26 17:56:41 -04:00
Matthias Clasen
73d81d7178 broadway: Stop using the query_state vfunc
Just call the backend implementation directly.
2020-08-26 17:56:41 -04:00
Matthias Clasen
84355ccbff Drop _gdk_device_query_state
It is now unused.
2020-08-26 17:56:41 -04:00
Matthias Clasen
b2c92392fc macos: Stop using _gdk_device_query_state
Directly use the backend implementation.
2020-08-26 17:56:41 -04:00
Matthias Clasen
9e06e830b7 win32: Stop using _gdk_device_query_state
Directly use the backend implementation.
2020-08-26 17:56:41 -04:00
Matthias Clasen
62a4a356c9 x11: Stop using _gdk_device_query_state
Directly use the backend implementation.
2020-08-26 15:31:07 -04:00
Matthias Clasen
1e4c6cde10 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3090

See merge request GNOME/gtk!2485
2020-08-26 18:02:18 +00:00
Alexander Larsson
d57e6b754f broadway: Prune fully clipped render nodes
If some node is fully outside the clip region we don't send it to the daemon.
This helps a lot in how much data we send for scrolling viewports.

However, sending partial trees makes node reuse a bit more tricky. We
can't save for reuse any node that could possibly clip different depending on
the clip region, as that could be different next frame. So, unless the
node is fully contained in the current clip (and we thus know it is not
parial) we don't allow reusing that next frame.

This fixes #3086
2020-08-26 18:08:00 +02:00
Matthias Clasen
74a452df6c Make gdk_surface_get_device_position return a boolean
A year ago, we make this function not return the child
surface anymore. But the information whether the device
is actually over the surface is still useful, and we
should not loose it.
2020-08-26 09:11:28 -04:00
Timm Bäder
45046a53eb Merge branch 'broadway-debug-nodes' into 'master'
Broadway: Fix handling of debug nodes

See merge request GNOME/gtk!2486
2020-08-26 12:38:09 +00:00
Alexander Larsson
918996b047 Broadway: Fix handling of debug nodes
The debug nodes have id BROADWAY_NODE_DEBUG, which happens to be "12".
So, don't hardcode the wrong number "14".
2020-08-26 14:01:00 +02:00
Alexander Larsson
fcaa6e98d0 broadway: Correct handling of opaque colors
If alpha is 255, we use rgb() instead of rgba(), not if alpha is 0.
This makes the title bar gradient go from fully transparent to blue
rather than black to blue..
2020-08-26 12:18:28 +02:00
Matthias Clasen
125ed52ccb Merge branch 'new-sysprof' into 'master'
Port profiling to sysprof-collector api

See merge request GNOME/gtk!2457
2020-08-21 23:58:09 +00:00
Matthias Clasen
81e88c1d9e Alterative sysprof build support
Don't link libgtk against libsysprof. We only
need that for the test-performance binary.
2020-08-21 18:28:29 -04:00
Matthias Clasen
d4e069a629 Port tracing to the sysprof collector api
Use the new sysprof collector api to do tracing.
2020-08-21 10:55:01 -04:00
Björn Daase
6315cd977c *: Fix spelling mistakes found by codespell 2020-08-21 15:29:34 +02:00
Matthias Clasen
b3786b7b07 gdk: Slim down gdkinternals.h more
Move things to the private headers they belong in.
2020-08-14 07:45:53 -04:00
Matthias Clasen
6cf8f1cdf2 gdk: Move GdkSurfaceTypeHint to its sole user
The x11 backend is the only place where surface
type hints are used in any way. Move the enum
there.
2020-08-14 07:45:53 -04:00