summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* compositor/x11: Drop duplicated methods callsbilelmoussaoui/x11-build-guardsBilal Elmoussaoui2023-03-281-4/+0
| | | | Those are called in the handler of MetaDisplay::x11-display-opened
* wayland: Move surface check to MetaWaylandSurfaceBilal Elmoussaoui2023-03-287-25/+21
| | | | | Allows dropping various HAVE_XWAYLAND ifdef as the function would always return false if Mutter is built without XWayland
* wayland: Guard XWayland typesBilal Elmoussaoui2023-03-286-4/+20
|
* core/events: Guard X11 typesBilal Elmoussaoui2023-03-281-4/+12
|
* compositor/dnd: Guard X11 typesBilal Elmoussaoui2023-03-283-1/+12
|
* core/display: Guard X11 typesBilal Elmoussaoui2023-03-283-23/+64
| | | | | | | This also moves a couple of function calls to MetaDisplay::x11-display-opened a signal handler Related https://gitlab.gnome.org/GNOME/mutter/-/issues/2272
* compositor: Guard X11 typesBilal Elmoussaoui2023-03-286-79/+90
| | | | | | | This also moves meta_compositor_x11_redirect_windows to DisplayX11 where it makes more sense as meta_display_x11_redirection_windows Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2272
* Update Chinese (China) translationBoyuan Yang2023-03-271-81/+99
|
* window-actor-x11: Check array bounds before accessing arrayJonas Dreßler2023-03-261-1/+1
| | | | | | | | | | | | scan_visible_region() scans through each value of a uint8_t array and checks whether that value is 255. Right now it always checks one value too much though, resulting in a buffer overflow. Fix that by checking the array bounds before actually accessing the array. Found by running gnome-shell with address sanitizer and starting GIMP. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2856>
* build: Don't disable checks in release buildsSebastian Keller2023-03-242-2/+0
| | | | | | | | | | | Both Clutter and Cogl use g_return(_val)_if_fail() to safeguard introspected API. Release builds were dropping these checks, which could result in a much more crashy experience, especially when considering extensions, but also due to bugs in the shell code itself. This won't affect any major distro, because they all use "plain" builds. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2930>
* tests: Use a more interoperable path to bashSimon McVittie2023-03-225-5/+5
| | | | | | | | | | | On systems that have undergone the /usr merge, /bin/bash and /usr/bin/bash can be used interchangeably, but on systems where /bin and /usr/bin are separate (such as Debian 11 or older), bash was traditionally in /bin and there is no bash in /usr/bin. Resolves: https://gitlab.gnome.org/GNOME/mutter/-/issues/2385 Signed-off-by: Simon McVittie <smcv@debian.org> Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2900>
* backend/nested: Ignore setting pointer constraintJonas Ådahl2023-03-221-0/+8
| | | | | | | This avoids a crash when pointer constraints are enabled by Wayland clients. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2932>
* clutter: Safely transform paths to strings and vice versaEmmanuele Bassi2023-03-211-5/+12
| | | | | | | | | GValues containing objects and strings can be set to NULL, which means the transformation functions from ClutterPath to string and vice versa must be NULL-safe. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2625 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2929>
* Export meta_window_has_pointer ()Ivan Molodetskikh2023-03-202-2/+3
| | | | | | It is needed in gnome-shell in the screenshot UI to tell which window has a pointer over it. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2928>
* compositor/window-drag: Fix keyboard resizeFlorian Müllner2023-03-201-2/+2
| | | | | | | | | | | | | | Both GRAB_OP_KEYBOARD_MOVING and GRAB_OP_KEYBOARD_RESIZING_* are defined as GRAB_OP_WINDOW_BASE with FLAG_KEYBOARD set, but the latter have additional bits set to indicate the direction. That is, the GRAB_OP_KEYBOARD_MOVING bitmask cannot be used to differentiate between move- and resize operations. Instead, check that no direction bits are set. https://gitlab.gnome.org/GNOME/mutter/-/issues/2684 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2908>
* backends: Fall back to the default and not the unknown color spaceSebastian Wick2023-03-202-3/+3
| | | | | | | | | | | The unknown color space's only purpose is to signal that the current KMS state has a unknown color space set. It is not one of the color spaces that can be set. We already only try to set a color space if the default color space is supported so we should use the default color space as a fallback instead of the unknown color space. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2693 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2915>
* kms/impl-device/simple: Avoid destroying a NULL hash tableDaniel van Vugt2023-03-201-1/+1
| | | | | | | | | | Which would trigger: ``` g_hash_table_destroy: assertion 'hash_table != NULL' failed ``` on non-KMS systems like with `nvidia-drm.modeset=0`. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2904>
* wayland/buffer: Avoid spamming the log when a buffer is not scanoutableDaniel van Vugt2023-03-201-4/+3
| | | | | | | | | | It's not really an error and we recover seamlessly. If someone really wants to check if/why direct scanout is failing then they can still use `env MUTTER_DEBUG=render,kms`. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2702 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2918>
* kms/device: Avoid leaking some fieldsJonas Ådahl2023-03-191-0/+3
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2926>
* kms/impl-device: Fix result listener list leakSebastian Keller2023-03-191-1/+1
| | | | | | | queue_result_feedback() takes ownership of the result listeners list via meta_kms_update_take_result_listeners(), but does not free it. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2922>
* Bump version to 44.044.0Florian Müllner2023-03-192-1/+15
| | | | Update NEWS.
* Revert "core: Avoid setting up frames on fullscreen windows"Jonas Ådahl2023-03-183-17/+7
| | | | | | | | | | | This caused feedback loops with old statically compiled SDL applications. The bug is fixed in upstream SDL, but that doesn't help when the executables have old SDL's built into them. This reverts commit beeeea546b2145e138a247334d81cfa984da3308. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2678 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2921>
* backends/native: Report correct Gamma support on the KMS properties pathSebastian Wick2023-03-181-6/+7
| | | | | | | | The gamma property blob can be zero to indicate passthrough but Gamma is still supported in that case. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2686 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2916>
* monitor-manager: Apply switch-config in idle callbackJonas Ådahl2023-03-183-12/+172
| | | | | | | | | | Just as with restoring the previous monitor configuration in case the user clicked "revert" in GNOME Shell's monitor configuration confirmation dialog, we need to do switch configs in an idle callback as well. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2694 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2912>
* core: Retrieve DESKTOP_AUTOSTART_ID early on startupCarlos Garnacho2023-03-182-10/+11
| | | | | | | | | | | | | | | | | | | | With the move away from GTK3, and the indirect dependency on GTK4 grown in the GNOME Shell side, we've indirectly gotten a small sneaky behavioral change: The GTK4 library will, right on dlopen, get DESKTOP_AUTOSTART_ID for itself and delete it from the environment. This happens before our own X11 session management code is initialized, which confuses the hell out of it, into thinking initialization is actually shutdown, gnome-session does not follow along with this request, which leaves GNOME Shell into a confused startup state where it never calls SmcSaveYourselfDone() and grinds startup to a halt until gnome-session decides to move things forward. In order to fix this, get the DESKTOP_AUTOSTART_ID before we lend control to GNOME Shell bits and GTK4 is possibly initialized, and feed it directly to our X11 session manager bits. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2906>
* monitor-manager: Restore old config in idle callback when unconfirmedJonas Ådahl2023-03-182-24/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We might get told to restore the old monitor configuration by the monitor configuration prompt, in case the user pressed "revert" or equivalent. This might be in response to a button press, and those happen during frame clock dispatch. If we would restore an old configuration during dispatch, it means we would reconfigure the monitors including their stage views while dispatching, which means we'd destroy the frame clock while it's dispatching. Doing that causes problems, as the frame clock isn't expecting to be destroyed mid-function. Specifically, We'd enter clutter_frame_clock_dispatch (clutter-frame-clock.c:811) frame_clock_source_dispatch (clutter-frame-clock.c:839) g_main_dispatch (gmain.c:3454) g_main_context_dispatch (gmain.c:4172) g_main_context_iterate.constprop.0 (gmain.c:4248) g_main_loop_run (gmain.c:4448) meta_context_run_main_loop (meta-context.c:482) main (main.c:663) which would first call _clutter_process_event (clutter-main.c:920) _clutter_stage_process_queued_events (clutter-stage.c:757) handle_frame_clock_before_frame (clutter-stage-view.c:1150) which would emit e.g. a button event all the way to a button press handler, which would e.g. deny the new configuration: restore_previous_config (meta-monitor-manager.c:1931) confirm_configuration (meta-monitor-manager.c:2866) meta_monitor_manager_confirm_configuration (meta-monitor-manager.c:2880) meta_plugin_complete_display_change (meta-plugin.c:172) That would then regenerate the monitor configuration and stage view layout, which would destroy the old stage view and frame clock. meta_stage_native_rebuild_views (meta-stage-native.c:68) meta_backend_native_update_screen_size (meta-backend-native.c:457) meta_backend_sync_screen_size (meta-backend.c:266) meta_backend_monitors_changed (meta-backend.c:337) meta_monitor_manager_notify_monitors_changed (meta-monitor-manager.c:3595) meta_monitor_manager_rebuild (meta-monitor-manager.c:3683) meta_monitor_manager_native_apply_monitors_config (meta-monitor-manager-native.c:343) meta_monitor_manager_apply_monitors_config (meta-monitor-manager.c:704) After returning back to the original clutter_frame_clock_dispatch() frame, various state in the frame clock will be gone and we'd crash. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2901>
* monitor-manager: Use g_clear_handle() to clean up D-Bus name owningJonas Ådahl2023-03-181-5/+1
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2901>
* monitor-manager: Use guint for handle IDsJonas Ådahl2023-03-181-3/+2
| | | | | | To follow convention. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2901>
* clutter/frame-clock: Warn if frame clock is disposed while dispatchingJonas Ådahl2023-03-181-0/+2
| | | | | | | This shouldn't happen, but warn anyway to be a bit more helpful if things go bad. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2901>
* Update Korean translationGwan-gyeong Mun2023-03-161-116/+133
|
* Update Czech translationMarek Černocký2023-03-141-16/+12
|
* Update Polish translationPiotr Drąg2023-03-111-92/+93
|
* Updated Danish translationAsk Hjorth Larsen2023-03-101-80/+92
|
* Bump version to 44.rc44.rcFlorian Müllner2023-03-062-1/+42
| | | | Update NEWS.
* prefs: Add get_keybinding_label() methodFlorian Müllner2023-03-062-0/+19
| | | | | | | | | | | | | Commit 7e9d9c7eb91 added new API to replace GTK for accelerator parsing. Unfortunately there is another case in gnome-shell, where we have to get the label from the logical binding name rather than the modifier+keysym combination. Add another small method to cover that use case. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2899>
* core: Avoid focusing windows on map during grabsCarlos Garnacho2023-03-051-0/+9
| | | | | | | | | Normally, mutter implicitly allows a window being shown to take focus. This is normally desired, except it steals input from GNOME Shell self. Avoid focusing the just shown window in those situations. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2878>
* x11: Ignore _NET_ACTIVE_WINDOW client messages while grabbedCarlos Garnacho2023-03-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | When a X11 application is started, typically what happens is: - A startup notification token is created, with a _TIME%d suffix - The application being spawned receives it through the environment - (dbus piping, maybe) - The application replies the startup notification token, and fetches the timestamp from it - The application makes a _NET_ACTIVE_WINDOW client message request with this timestamp - Mutter handles this client request and activates/focuses the window Prevent this last step if windows are not interactable (e.g. there is a compositor grab) and ignore the focus request. This specifically applies to X11 clients requesting focus themselves, and unlike previous approaches, doesn't try to prevent focus changes that do come through interaction with Mutter/GNOME Shell. This should only break if applications do not observe _NET_ACTIVE_WINDOW and perform XSetInputFocus on themselves, but in that case the X11 keyboard focus is stolen from our hands already. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2878>
* Revert "x11/events: Do not update focus XWindow during grabs"Carlos Garnacho2023-03-051-5/+1
| | | | | | This reverts commit 0e6395d93284422848ca3a5ffb88d48fbce7d471. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2878>
* Revert "x11: Do not move X11 input focus during grabs"Carlos Garnacho2023-03-053-26/+0
| | | | | | This reverts commit a68b8e95954772cd6f5d676a803e01c13e48c83f. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2878>
* tests/wayland: Add missing dependenciesRobert Mader2023-03-052-0/+2
| | | | | | They're needed for `ceilf()`. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2895>
* frames: Select SubstructureNotifyMask tooJonas Ådahl2023-03-041-1/+2
| | | | | | | | | | | | | | | This is the mask that lets us receive among other events the rather important CreateNotify, that tells us about new winows. This has went by rather unnoticed except for cases where multiple windows show up very quickly directly after the frames client spawned, because the drag icon surface cache eventually already did select that particular mask. Make things more reliably by explicitly setting the mask for the events we rely on to function. This fixes flaky stacking tests that map multiple X11 windows in a row. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2894>
* tests/wayland: Add test for fractional-scale protocolRobert Mader2023-03-048-2/+411
| | | | | | | For now test that a simple fullscreen client on a FullHD screen selects the expected values. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2394>
* tests/build: Order Wayland tests alphabeticallyRobert Mader2023-03-041-6/+13
| | | | | | And ensure they all start with "wayland-" for consistency. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2394>
* tests/wayland-client-utils: Use interface names instead of static stringsRobert Mader2023-03-041-6/+6
| | | | | | Let's be a good example here. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2394>
* wayland/surface: Export get_buffer_[width|height] to testsRobert Mader2023-03-042-44/+55
| | | | | | It will be used in fractional scale tests. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2394>
* wayland: Implement fractional_scale_v1 protocolRobert Mader2023-03-046-0/+243
| | | | | | | | | | Giving clients hints about optimal fractional scaling ratios, to be used together with the `wp_viewport` protocol. See https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/1.31/staging/fractional-scale/fractional-scale-v1.xml Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2394>
* meson: Bump wayland-protocols requirement to 1.31Robert Mader2023-03-041-1/+1
| | | | | | Which includes the fractional scaling protocol. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2394>
* wayland/surface: Fix can_scanout_untransformed() for transform+viewportRobert Mader2023-03-041-7/+23
| | | | | | | | | The buffer needs to match the untransformed layout size. While on it simplify the check from floats to ints where possible - and improve logging a bit. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2394>
* tests/build: Move 'service-channel' test to a 'misc' sectionJonas Ådahl2023-03-041-8/+12
| | | | | | | It only has a Wayland test, but might get Wayland unrelated things in the future, so move it away into a "misc" section. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2892>
* constraints: Don't apply titlebar constraint on non-drag user-op moveJonas Ådahl2023-03-041-3/+3
| | | | | | | | | | | | | | 2d8fa26c8e ("core: Pass "frame action" grab operations as an "unconstrained" grab op") changed the behaviour to treat non-grab related window moving that has the "user action" flag set to still apply the "constrain_titlebar_visible" constraint. The fact that it wasn't applied before was relied upon by some extensions. While it should arguably exist a better API that for such extensions to use that have a bit more predictable behavior, until that is so, restore the old semantics. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2891>