Commit Graph

9480 Commits

Author SHA1 Message Date
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
Matthias Clasen
79c2c3e353 win32: Drop vestigial surface type hint field
This wasn't used in any way.
2020-08-14 07:45:53 -04:00
Matthias Clasen
3d7343144f wayland: Drop unused surface type hint field
This wasn't used at all.
2020-08-13 22:24:06 -04:00
Matthias Clasen
3c44e9c563 gdk: Slim down gdkinternals.h
Move things to the private headers they belong in.
2020-08-13 22:24:06 -04:00
Matthias Clasen
8a13d18655 Drop gdk_device_get_position
Convert the last user to _gdk_device_query_state
and drop this unused internal api.
2020-08-13 22:24:06 -04:00
Matthias Clasen
9786185cc0 gdk: Clean up gdkdevice.h
This header looked just too disorderly.
Same for gdkdevicetool.h.
2020-08-13 22:24:06 -04:00
Matthias Clasen
22ac6d3148 gdk: Documentation touchups
Minor rewordings here and there, strip nonpublic
functions of doc comments, deemphasize logical/physical
devices.
2020-08-13 22:24:06 -04:00
Matthias Clasen
97e0f1108d docs: Cosmetics 2020-08-13 22:24:06 -04:00
Matthias Clasen
9b0a5b1fde Add sizes to toplevelsize warnings
Might as well be informative while we're annoying.
2020-08-11 16:27:03 -04:00
Matthias Clasen
a85fc0008c wayland: Don't send invalid anchor rectangles
When we send an anchor rectangle with a width or
height of 0, mutter reponds with "Invalid anchor
rectangle size". So, don't do that.

This was seen as sudden disappearance of gtk4-demo
when you click the fishbowl benchmark all the way
through to the menubuttons.

Fixes: #3027
2020-08-09 16:02:25 -04:00
Matthias Clasen
bb30a23004 x11: Fix getting the primary monitor
Actually return the primary monitor.

Fixes: #3038
2020-08-08 11:48:32 -04:00
Matthias Clasen
fd1033f974 surface: Add width and height properties 2020-08-08 09:24:30 -04:00
Matthias Clasen
16505a4d1e gdk: Move the ::popup-layout-changed signal
Move this signal from GdkSurface to GtkPopup,
where it belongs.
2020-08-08 09:24:30 -04:00
Matthias Clasen
0b21883518 toplevel: Revise docs wording a bit
The documentation of ::compute-size didn't quite
keep up with the changes in the MR. Fix it up.
2020-08-07 14:56:42 -04:00
Matthias Clasen
1ccab92813 Merge branch 'matthias/fix-min-size' into 'master'
Matthias/fix min size

See merge request GNOME/gtk!2404
2020-08-07 18:46:24 +00:00
Matthias Clasen
a95012caa3 Check sanity of toplevel sizes
Emit a warning when sizes returned in GdkToplevelSize
don't look sane. This is the case in the failing
reftest.
2020-08-07 12:45:19 -04:00
Jonas Ådahl
6724d4250f wayland/toplevel: Don't leak wl_callback used during present() 2020-08-07 14:01:16 +02:00
Jonas Ådahl
c27f811462 wayland/surface: Destroy toplevel present callback if ignored
We might break the loop early, e.g. if we're unmapped before the round
trip finishes, and to avoid the callback to write to invalid stack
memory, destroy the callback so it won't be invoked.

Fixes: #3026
2020-08-07 09:06:21 +02:00
Jonas Ådahl
3590923c8b wayland/surface: Fix toplevel present roundtrip condition
We should round trip until we both have received callback and have
ensured we received the initial configuration.
2020-08-07 09:06:21 +02:00
Matthias Clasen
26542778f7 Merge branch 'dnd-leaks' into 'master'
Dnd leaks

See merge request GNOME/gtk!2391
2020-08-07 00:34:38 +00:00
Matthias Clasen
12450cfcef wayland: Don't leak content formats
We were not unreffing the formats here.
2020-08-06 20:02:33 -04:00
Matthias Clasen
71373ff6fb drop: Don't leak the surface and formats 2020-08-06 20:02:33 -04:00
Matthias Clasen
1fa9261fe3 contentdeserializer: Add some missing annotations 2020-08-06 20:02:33 -04:00
Matthias Clasen
0c82aa314c Fix a leak in scroll event compression
We were leaking the last event in a sequence
of scroll events.
2020-08-06 19:31:38 -04:00
Andreas Persson
71cec2ef5d gdk/toplevel: fix declarations of GdkToplevelSize
GDK_AVAILABLE_IN_ALL was missing from gdk_toplevel_size_get_bounds and
gdk_toplevel_size_set_max_size was declared though it doesn't exist.
2020-08-06 16:14:10 +02:00
Matthias Clasen
1d7b273669 docs: Clean up dangling links in gdk docs
Clean up references to no-longer-existing APIs.
2020-08-05 15:45:43 -04:00
Matthias Clasen
d7c4f93c76 Merge branch 'wip/compute-size' into 'master'
Compute size via signal

See merge request GNOME/gtk!2325
2020-08-05 16:19:19 +00:00
Jonas Ådahl
2ff74eb667 gdk/toplevel: Negotiate surface size via a compute-size signal
GTK will not up front know how to correctly calculate a size, since it
will not be able to reliably predict the constraints that may exist
where it will be mapped.

Thus, to handle this, calculate the size of the toplevel by having GDK
emitting a signal called 'compute-size' that will contain information
needed for computing a toplevel window size.

This signal may be emitted at any time, e.g. during
gdk_toplevel_present(), or spontaneously if constraints change.

This also drops the max size from the toplevel layout, while moving the
min size from the toplevel layout struct to the struct passed via the
signal,

This needs changes to a test case where we make sure we process
GDK_CONFIGURE etc, which means we also needs to show the window and
process all pending events in the test-focus-chain test case.
2020-08-05 15:49:00 +02:00
Matthias Clasen
8870ec5e7b Merge branch 'hex-color-parse' into 'master'
Hex color parse

Closes #2931

See merge request GNOME/gtk!2356
2020-08-05 11:46:55 +00:00
Chun-wei Fan
edc1c28236 GdkGLContext: Drop gdk_gl_context_has_[framebuffer_blit|frame_terminator]()
gdk_gl_context_has_framebuffer_blit() and gdk_gl_context_has_frame_terminator()
were only used by by GDK/Win32, and they do not provide performance advantages
in GTK master, so clean up the code a bit by dropping them.
2020-08-05 18:56:57 +08:00
Chun-wei Fan
d2291abe2a gdksurface-win32.c: Fix resizing
Use gdk_surface_get_geometry() to get the correct x and y coordinates of the
window that we are resizing, so that the window does not reposition itself
automatically at the top-left corner at resizing as we to used hard-code the x
and y coordinates to 0.
2020-08-05 16:23:14 +08:00