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
3248bdc726
surface: Remove abs_x/abs_y
...
We no longer have child windows, so the offset is
always 0.
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
77e99f70fe
surface: Simplify some code
...
Fold gdk_surface_process_updates_recurse into its
only caller. There is no recursion here anymore.
2019-05-28 20:25:14 +00:00
Matthias Clasen
0699b17848
Remove surface->children
...
This field is not used at all anymore.
2019-05-28 20:25:13 +00:00
Matthias Clasen
2eebac8819
gdk: Stop using surface->children
...
It is always NULL.
2019-05-28 20:25:13 +00:00
Matthias Clasen
7aae92656d
wayland: Stop using surface->children
...
It is always NULL.
2019-05-28 20:25:13 +00:00
Matthias Clasen
e68c5541e2
Remove surface->parent
...
This field is no longer used.
2019-05-28 20:25:13 +00:00
Matthias Clasen
0760958f71
gdk: Stop using surface->parent
...
It is always NULL.
2019-05-28 20:25:13 +00:00
Matthias Clasen
edab50139a
broadway: Stop using surface->parent
2019-05-28 20:25:13 +00:00
Matthias Clasen
6183d58f80
x11: Stop using surface->parent
...
It is always NULL.
2019-05-28 20:25:13 +00:00
Matthias Clasen
bb1dd3f3ae
wayland: Stop using surface->parent
...
It is always NULL.
2019-05-28 20:25:13 +00:00
Matthias Clasen
60ec1ee334
surface: Remove code dealing with child surfaces
...
We no longer have child surfaces, so this code
is never run.
2019-05-28 20:25:13 +00:00
Matthias Clasen
90e86b351d
surface: minor cleanup
...
Make gdk_surface_new fully private, and reduce the use
of GdkSurfaceAttr.
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
f7e1146eda
wayland: Stop using child surface apis
...
We no longer have child surfaces.
Drop code that only makes sense in their
presence.
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
9e6d8becbb
surface: Start sketching a new surface type
...
Start by adding a constructor. We have to call it
gdk_surface_new_popup_full for now, since gdk_surface_new_popup
is taken. This may be reshuffled later.
2019-05-28 20:25:13 +00:00
Benjamin Otte
096d28e60c
surface: Add marshallers for new events
...
This way, sysprof can profile through the signal emission, and for
signals this low in the stack, this is very useful.
2019-05-28 19:19:24 +02:00
Matthias Clasen
106dd75b3b
Remove an unused function
...
_gdk_make_event was not used anywhere.
2019-05-27 20:23:50 -04:00
Matthias Clasen
71cc68b14b
surface: fix up docs
...
The docs for gdk_surface_invalidate_region were
talking about a no-longer-existing argument.
2019-05-26 00:07:47 -04:00
Matthias Clasen
c50052e223
Revert "wayland: Keep some resources until destroy"
...
This reverts commit f2d598b9a1
.
2019-05-25 18:08:43 +00:00
Matthias Clasen
beedec1904
broadway: add frame times to the profiler
2019-05-24 07:19:14 -04:00
Olivier Fourdan
713fceb1bd
wayland: Use scale from core wl_output protocol
...
The “xdg-output” protocol provides clients with the outputs size and
position in compositor coordinates, and does not provide the output
scale which is already provided by the core “wl_output” protocol.
So when receiving the wl_output scale event, we should update the scale
regardless of “xdg-output” support, otherwise the scale will remain to
its default value of 1 and the surface will be scaled up by the
compositor to match the actual output scale, which causes blurry fonts
and widgets.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1901
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2019-05-22 12:22:36 +02:00
Federico Mena Quintero
2a9b3c6a0c
Use g_once for all the mkenums template files
...
Without this, initialization of enum/flags values from multithreaded
programs may not work correctly.
Fixes #1617 .
2019-05-21 10:32:08 -05:00
Benjamin Otte
143bba075f
win32: Remove outdated workaround
...
The function that was missing in 2016 does exist now.
Fixes gcc complaining about a wrong declaration.
2019-05-21 07:33:57 +02:00
Benjamin Otte
0877b29e8e
win32: Actually pass y variable for y parameter
2019-05-21 07:23:30 +02:00
Benjamin Otte
1793546d7a
win32: Remove unused variables
2019-05-21 07:23:30 +02:00
Benjamin Otte
678aa8088f
rgba: Add GDK_RGBA() macro
...
So far it's private, but it's a pretty cute way to use hex colors, so we
might conside making it public.
2019-05-21 06:43:59 +02: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
54530334f4
Revert "wayland: Make popups work more than once"
...
This reverts commit e74c655016
.
2019-05-19 16:50:49 +00:00
Matthias Clasen
eed37cd59a
Cosmetic changes
...
Use new-style padding for GdkContentProviderClass.
2019-05-19 16:20:15 +00:00
Matthias Clasen
d4f6bfbdad
Merge branch 'frame-pixel-counter' into 'master'
...
profiling: Add a counter for pixels drawn per frame
See merge request GNOME/gtk!855
2019-05-19 15:20:52 +00:00
Matthias Clasen
e74c655016
wayland: Make popups work more than once
...
The change to keep some server resources around
until destroy was causing us to not recreate
the right things when a surface is hidden and
then shown again. Make sure to recreate everything.
2019-05-19 04:43:16 +00:00
Matthias Clasen
f2d598b9a1
wayland: Keep some resources until destroy
...
The Wayland backend was dropping _all_ serverside
resources on hide, which is too early e.g. for
GtkGLArea which wants to use egl resources to
unload textures on unrealize.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1485
2019-05-18 19:15:47 +00:00
Matthias Clasen
6c9d50a013
profiling: Add a counter for pixels drawn per frame
...
This number clearly shows the recently discovered
"full redraws" problem.
2019-05-18 18:04:35 +00:00
Benjamin Otte
6e2df85ec8
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
Closes #1900
See merge request GNOME/gtk!854
2019-05-18 15:19:29 +00:00
Benjamin Otte
b76eb96c58
glcontext: Store the updated area in the right place
...
We need to store the region *before* adding our own damage area, because
we want to only store the changes of this frame, not the whole history.
So do it in the same place Vulkan does it.
Fixes #1900
2019-05-18 17:06:08 +02:00
Matthias Clasen
7e59ec4afc
Add clock freezes to the profile
2019-05-16 20:50:31 +00:00
Matthias Clasen
15fec034df
always record a frame end time when profiling
...
We need to keep this time, or we may end up with
negative frame intervals.
2019-05-16 19:45:30 +00: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
Matthias Clasen
45b552d146
profiler: Prefer CLOCK_MONOTONIC
...
This is what g_get_monotonic_time gives us,
after all, and we need to have the same clock
in all our profiler data.
2019-05-15 13:52:12 -04: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
Matthias Clasen
ebc6bd834b
profiling: Only use frame timings when we have them
...
Christian Hergert reported a crash here,
when testing the profiling code.
2019-05-14 12:06:55 +00:00
Matthias Clasen
b3ff4154ec
Drop the public profiler api
...
I meant to do this before merging the profiler
support. Somehow the commit got lost.
2019-05-08 17:00:26 +00:00