summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* workspace: Warn instead of abort on incorrect API usageJonas Ådahl2022-12-171-2/+2
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2707>
* backends/native: Initialize keyboard a11y on startupCarlos Garnacho2022-12-171-0/+8
| | | | | | | | The MetaSeatImpl is tracking changes on keyboard a11y setting changes, but missing its initialization on startup. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1858 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2750>
* backends: Distinguish "no EDID" from "any EDID" mapping tabletsCarlos Garnacho2022-12-171-4/+9
| | | | | | | | | | | | | | | | | | | | Since the Wacom panel rewrite, the "output" setting is handled as a kind of tri-state for display-integrated tablets: - If the setting is unset, the device is automatically mapped to an output - If the setting is set and not empty, the device is mapped to the output defined by the EDID data - If the setting is ['', '', ''], the device is mapped to the span of all displays, like opaque tablets do. This distinction for the unset setting fell through the cracks, so both "Automatic" and "All displays" options were handled as the former. Add this distinction, so that display-integrated tablets can be used like opaque tablets of sorts with no limitations. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2767>
* backends: Only apply EDID-based tablet mapping heuristic on integrated devicesCarlos Garnacho2022-12-171-1/+1
| | | | | | | | | | | These are the ones attached to a display, thus they are the ones that may need help from this heuristic. Non-integrated tablets (e.g. Intuos) will default to the span of all monitors. Fixes mapping of opaque tablets if a display-integrated tablet of the same brand is also plugged in. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2767>
* window: Update mru list for every workspace the window is onSebastian Wick2022-12-171-14/+14
| | | | | | | | | If the window is on all workspaces we should update the mru list for all those workspaces, otherwise the default focus window for a specific workspace can be unexpected. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2548 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2747>
* workspace: Focus the default window only if no window is focusedSebastian Wick2022-12-171-0/+25
| | | | | | | | | This might happen when the workspace is not switched and focus_default_window is called or when 'workspace on primary display only' is enabled, a secondary display exists and the workspace is switched. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2747>
* wayland/outputs: Make wl_output mode independent of the orientationSebastian Wick2022-12-171-25/+6
| | | | | | | | | | | | wl_output describes the physical attributes and the mode of an output is such a physical attribute. Swapping the width and height creates another, incorrect mode. Other compositors also report the physical mode and don't try to transform it based on the orientation of buffers. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2519 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2723>
* core: Remove redundant ifdefCarlos Garnacho2022-12-161-2/+0
| | | | | | This code is already surrounded by the same ifdef. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2754>
* core: Consider ClutterGrabs checking whether windows are interactiveCarlos Garnacho2022-12-161-2/+6
| | | | | | | | | | | | | | | | There's 2 users of this, meta_display_sync_wayland_input_focus() which does already perform these checks on its own, and MetaCursorTracker's update_displayed_cursor() to determine whether it should go with the Wayland client's cursor. This second check should also consider the existing ClutterGrabs, so make meta_display_windows_are_interactable() handle them for both callers. Fixes the cursor shown over windows while e.g. there are menus opened. Close: https://gitlab.gnome.org/GNOME/mutter/-/issues/2553 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2754>
* window-actor/wayland: Return NULL instead FALSE in get_scanout_candidateRobert Mader2022-12-161-3/+3
| | | | | | Fixes 2933ca9e1c2eed6202d149249b4f250ac0588163 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2765>
* window-actor/wayland: Ignore unmapped subsurfaces in direct scanout checkRobert Mader2022-12-161-7/+15
| | | | | | | | | | | | Clients expect us to ignore them, thus do so. Right now, if the topmost subsurface is an unmapped subsurface, it will fail the `meta_surface_actor_is_opaque()` check if it was never mapped before. Further more, unmapped subsurfaces would wrongly disable our "only one surface and fullscreen" optimization. Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/2550 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2755>
* wayland/actor-surface: Optimize update schedulingRobert Mader2022-12-161-3/+8
| | | | | | | | | This code path is important for "empty" commits to ensure we schedule frame callbacks even if previous commits didn't cause stage redraws. There is, however, no reason to schedule updates on all stage views instead of only those the actor is on. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2671>
* surface-actor-wayland: Clean up and optimize check for primary viewRobert Mader2022-12-164-39/+54
| | | | | | | | | | | | | | | | | | | | Avoid some allocations, save some CPU cycles and make the code easier to read. Behaviourwise the only expected change is that now, if there are mapped clones, we unconditionally choose the view with the highest refresh rate the actor (or one of its clones) is on and don't check the obscurred region any more. Thus in some cases a client may receive a higher rate of frame callbacks when obscured on a faster view while a clone is present on a slower one. The assumption is that cases like this are relatively rare and that the reduction of code complexity, the reduction of allocations in `meta_surface_actor_is_obscured_on_stage_view()` whenever the actor is not fully obscured and has clones on other views, as well as generally fewer lookups and less code in most common cases, compensate for that. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2671>
* clutter/actor: Make is_effectively_on_stage_view() match has_mapped_clones()Robert Mader2022-12-161-0/+10
| | | | | | | | The clone handling did not take certain cases into consideration, thus copy over some extra checks from `has_mapped_clones()`, ensuring consistent behavior. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2671>
* feedback-actor: Disable direct scanout during lifetimeRobert Mader2022-12-161-0/+10
| | | | | | | | | | | | | | | | We only support feedback-actors, such as DnD-icons, in the compositing path at the moment. The approach is similar to how we handle certain shell elements. Implementations need to ensure no references to the object keep around longer that necessary. Arguably this should be replaced by a more robust and implicit actor hierachy detection in the direct scanout code at some point. Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/2470 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2677>
* screen-cast/src: Fix unsigned integer overflowGeorges Basile Stavracas Neto2022-12-151-2/+2
| | | | | | | | | | | | | | The fields of 'priv->video_format.max_framerate' are all of type uint32_t. Multiplying by G_USEC_PER_SEC can overflow, and equally, dividing a large numerical type by uint32_t can err too. Since the variable holding the result is int64_t, cast all uint32_t fields to int64_t before doing any maths on it. Spotted while trying to investigating an issue with framerates on HDMI screencasts. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2762>
* cogl/pipeline: Simplify cogl_pipeline_get_layer_filtersMichel Dänzer2022-12-151-8/+1
| | | | | | By using _cogl_pipeline_layer_get_filters. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2757>
* cogl/pipeline: Rename and export cogl_pipeline_get_layer_filtersMichel Dänzer2022-12-153-10/+20
| | | | | | | | | | | For symmetry with cogl_pipeline_set_layer_filters. Suggested by Jonas Ådahl. v2: * Align function parameters. (Jonas Ådahl) Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2757>
* cogl/pipeline: Remove cogl_pipeline_get_layer_min/mag_filterMichel Dänzer2022-12-152-62/+0
| | | | | | | | | | | | | | | | | | | | | | | | Unused since https://gitlab.gnome.org/GNOME/mutter/merge_requests/932 AFAICT. As a bonus, gets rid of these compiler warnings: ../cogl/cogl/cogl-pipeline-layer-state.c: In function ‘cogl_pipeline_get_layer_min_filter’: ../cogl/cogl/cogl-pipeline-layer-state.c:1279:10: warning: ‘min_filter’ may be used uninitialized [-Wmaybe-uninitialized] 1279 | return min_filter; | ^~~~~~~~~~ ../cogl/cogl/cogl-pipeline-layer-state.c:1274:22: note: ‘min_filter’ was declared here 1274 | CoglPipelineFilter min_filter; | ^~~~~~~~~~ ../cogl/cogl/cogl-pipeline-layer-state.c: In function ‘cogl_pipeline_get_layer_mag_filter’: ../cogl/cogl/cogl-pipeline-layer-state.c:1291:10: warning: ‘mag_filter’ may be used uninitialized [-Wmaybe-uninitialized] 1291 | return mag_filter; | ^~~~~~~~~~ ../cogl/cogl/cogl-pipeline-layer-state.c:1287:22: note: ‘mag_filter’ was declared here 1287 | CoglPipelineFilter mag_filter; | ^~~~~~~~~~ Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2757>
* build: Bump API versionMichel Dänzer2022-12-151-1/+1
| | | | | | | Next commit will break ABI, and the API version hasn't been bumped since the 43 branch. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2757>
* tests/screen-cast: Enable 'screen-cast' debug topicJonas Ådahl2022-12-131-0/+6
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2727>
* screen-cast: Add some debug loggingJonas Ådahl2022-12-131-0/+11
| | | | | | Will potentially help debugging issues without needing to recompile. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2727>
* tests/clutter/event-delivery: Flush input thread after eventsJonas Ådahl2022-12-131-0/+2
| | | | | | | Otherwise the test becomes flaky, due to events not having ended up on the main thread yet. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2727>
* tests/clutter/utils: Add helper to flush input threadJonas Ådahl2022-12-132-0/+10
| | | | | | | This helps making sure input events we inject have managed to reach the main thread. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2727>
* tests/utils: Add helper to flush the input threadJonas Ådahl2022-12-134-0/+53
| | | | | | | | | | | | | | | Add a helper function that ensures any queued virtual input events have been flushed from the input thread. This works by posting a task to the input thread, which will itself queue another callback back to the main thread. Once the main thread callback is invoked, the flush call is unblocked and the function returns. Upon this, any previously emitted virtual input event should have already passed through the input thread back into the main thread, however not necessarily fully processed. For making sure it has been processed, one also have to make sure the stage has been updated, e.g. via `meta_wait_for_paint()`. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2727>
* tests/clutter/event-delivery: Queue update before waitingJonas Ådahl2022-12-131-3/+5
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2727>
* tests/screen-cast: Add debug logs to screen cast clientJonas Ådahl2022-12-132-4/+25
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2727>
* frames: Handle lack of WM_DELETE_WINDOW in WM_PROTOCOLSCarlos Garnacho2022-12-101-9/+71
| | | | | | | It is expected that we XKillClient() those clients that do not handle WM_DELETE_WINDOW messaging. Fixes closing glxgears. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2756>
* wayland/pointer-constraints: Adjustments for subsurface supportRobert Mader2022-12-091-3/+4
| | | | | | | | After the commit "wayland/subsurface: Implement meta_wayland_surface_get_window()" subsurfaces are supported. Adjust some comments and fix a warning that could occur when closing a window. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2717>
* wayland/subsurface: Check ancestor instead of toplevel window for actor syncRobert Mader2022-12-091-3/+1
| | | | | | | | | | | The intention here was to check if the subsurface belongs to a window. Thus it didn't behave as expected for subsurfaces belonging to non-toplevel windows. After the previous commit we can use `get_window()` to check for what we actually want here. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2717>
* wayland/subsurface: Implement meta_wayland_surface_get_window()Robert Mader2022-12-091-0/+15
| | | | | | | | | | | | | Subsurfaces are special regarding windows as they don't have a window, but usually have an ancestor which does. All current users of `get_window()` are either used for known surface roles, such as xdg-* ones, or, as is the case for pointer constrains, would actually want to get the ancestors window. Thus implement `get_window()` to allow pointer constrains to work. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2223 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2717>
* wayland/dma-buf: Add 'render' debug printsRobert Mader2022-12-091-3/+7
| | | | | | And change existing ones where it makes sense. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2680>
* wayland/buffer: Add 'render' debug printsRobert Mader2022-12-091-0/+4
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2680>
* wayland/surface: Add 'render' debug printsRobert Mader2022-12-091-5/+30
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2680>
* window-actor: Add 'render' debug printsRobert Mader2022-12-092-6/+30
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2680>
* compositor-view/native: Add 'render' debug printsRobert Mader2022-12-091-15/+80
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2680>
* x11: Drop unused functionCarlos Garnacho2022-12-092-21/+0
| | | | | | | | | The meta_prop_get_motif_hints() function was only used in the old MetaUI frames code. The remaining code in mutter accesses directly the MetaPropValue when loading properties for a window, and does not use this API call. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2741>
* Revert "x11: Move Motif WM hints to a separate header"Carlos Garnacho2022-12-094-60/+57
| | | | | | | | | | | | | | | | Since we use XCB in the Mutter side, but Xlib in the frames client, we cannot share the same struct definition since both libraries will expect different type lengths (respectively, 32-bit ints vs. longs). Revert the changes that made both executables share the same struct, since not both of them can get it right (and retrieve correctly the struct with the contained flags) in reading the Motif WM hints. This reverts commit 2fb3c5a4f577aea9a4fc721807eb1ca4a49b8990. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2741>
* frames: Add CSS class on initGeorges Basile Stavracas Neto2022-12-092-1/+2
| | | | | | | | | | | | Adding the 'default-decoration' CSS class to MetaFrameHeader after it is set as the headerbar makes it not account for the minimum size correctly sometimes. This is a bit racy though - if the window opens very quickly, it works as expected. Adding the CSS class before the widget is used guarantees it'll always report the correct size though, so do that. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2753>
* ci: Fix the expected name of the junit report2486-mutter-crashes-on-xdg_activation-activate-requestHunor Csomortáni2022-12-061-1/+1
| | | | | | | Tests are run with '--setup plain', expect testlog-plain.junit.xml as an artifact name. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2733>
* check-style: Improve the proposed git-rebase commandHunor Csomortáni2022-12-061-2/+6
| | | | | | Include the sha used for the dry-run instead of using 'origin/main'. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2733>
* check-style: Use run() instead of Popen()Hunor Csomortáni2022-12-061-13/+26
| | | | | | | | | | | | | | | The Python docs recommends using run() for all use-cases it can handle: https://docs.python.org/3/library/subprocess.html#using-the-subprocess-module run() waits for the subprocess started to complete, so it's not necessary to use wait() and communicate() anymore. This simplifies the script. Previously running "check-style.py -r" after each commit in an interactive rebase failed, b/c the script did not wait for the amend command to complete. Using run() instead of Popen() solves this issue. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2733>
* check-style: Don't turn off formatting when the chunk starts on line 1Hunor Csomortáni2022-12-061-1/+2
| | | | | | | | Before this, new files introduced by the range of commits checked were not considered for formatting b/c uncrustify was always turned off in the beginning of the files, and never turned back on. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2733>
* check-style: Start enumerating lines from 1Hunor Csomortáni2022-12-061-3/+3
| | | | | | | | This way "the line before start" and "the line before end" can be expressed as "[start|end] - 1", which looks less like using a magic number. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2733>
* tiling: Remove unnecessary update_edge_constraints().Michael Webster2022-12-051-3/+0
| | | | | | | | Both meta_window_maximize and meta_window_tile use meta_window_maximize_internal(), and edge constraints are already recalculated and updated there. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2579>
* tiling: Skip the resize effect for tiled windows during user grabs.Michael Webster2022-12-051-6/+10
| | | | | | | | meta_window_tile gets called by the grabbed window's match during tile resizing. These incremental changes don't need to be animated. Closes: #2246 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2579>
* frames/window-tracker: Trivial style cleanupGeorges Basile Stavracas Neto2022-12-051-1/+1
| | | | | | A space of indentation was missing. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2740>
* frames: Add default-decoration CSS classGeorges Basile Stavracas Neto2022-12-052-0/+3
| | | | | | | | Add this CSS class both to the header bar itself, since it is what actually contains the window controls, and to MetaFrameHeader too, since it's what's directly attached to the window. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2740>
* frames/window-tracker: Initialize color scheme properlyGeorges Basile Stavracas Neto2022-12-051-3/+10
| | | | | | | | | | | | Previous commit added support for setting the GTK4 theme setting according to the color scheme setting. That's cool. What it didn't add, though, was initializing the GTK4 theme setting to the proper value. That means if the desktop starts at dark style, you'd still get a light titlebar. Fix that by updating the GTK4 theme setting on init as well. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2740>
* frames/window-tracker: Reinstate dark titlebar supportGeorges Basile Stavracas Neto2022-12-052-0/+29
| | | | | | | | | | | | | Merge request !2541 [1] introduced support for integrating Mutter frames with the dark style. This was lost after moving frames into a separate client. Bring that back. Don't depend on gdesktop-enums as it brings GTK3 into the header chain. [1] https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2541 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2739>