1
0
Fork 0
mutter-performance-source/src/frames
Carlos Garnacho 4f68713020 frames: Notify borders on first content resize
This addresses the following race condition:
1. Window+MetaFrame are created non-fullscreen, _MUTTER_FRAME_EXTENTS
   is initialized through widget measuring, accounting for frame.
2. Window and MetaFrame become fullscreen.
3. MetaFrameContent gets first size allocation, already fullscreen.
4. Borders were initialized to 0,0,0,0, become set to 0,0,0,0 correctly
   reflecting fullscreen, however notify::borders is not emitted.
5. _MUTTER_FRAME_EXTENTS stays accounting for the frame extents.

It sounds sensible to have the borders initialized to a meaningful value,
so account for the first time the border would be set due to the content
being (re)sized, and let this first value trigger notify::borders resulting
in _MUTTER_FRAME_EXTENTS updates.

Since all later _MUTTER_FRAME_EXTENTS changes happen through content
resizes, we only have to cater for this initial handover between the
frame/content initialization paths done through widget measuring and
the later paths done through MetaFrameContent resizes.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2937
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3476>
2024-01-03 19:31:51 +00:00
..
main.c frames: Use cairo renderer on GTK frames 2023-04-24 12:07:06 +02:00
meson.build Revert "x11: Move Motif WM hints to a separate header" 2022-12-09 16:28:33 +00:00
meta-frame-content.c frames: Notify borders on first content resize 2024-01-03 19:31:51 +00:00
meta-frame-content.h cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00
meta-frame-header.c frames: Add CSS class on init 2022-12-09 12:25:07 -03:00
meta-frame-header.h cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00
meta-frame.c frames: Fix XGetWMNormalHints return value check 2023-07-20 10:19:22 +00:00
meta-frame.h cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00
meta-window-tracker.c cleanup: Stop translating nick/blurb for pspecs 2023-07-19 11:33:59 +00:00
meta-window-tracker.h cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00