Commits on Source (42)
-
Jonas Ådahl authored
When we created the DMA buffer backed CoglFramebuffer, we handed it over to CoglDmaBufHandle which took its own reference. What we failed to do was to release our own reference to it, effectively leaking it. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1283 (cherry picked from commit c823b5dd)
0d9ded40 -
Jonas Ådahl authored
When a touch sequence was rejected, we'd update the event timestamps of incoming touch events to help with implementing grabs. This was done by sending a ClientMessage with a counter, and comparing the counter to decide whether we're seing a replayed event or not. This had the unforseen consequence that we would potentially end up destroying all actors including the stage, since, when mutter receives a ClientMessage event, it would assume that it's a WM_PROTOCOLS event, and handle it as such. The problem with this approach is that it would ignore fact that there might be other ClientMessage types sent to it, for example the touch synchronization one. What could happen is that the touch count value would match up with the value of the WM_DELETE_WINDOW atom, clutter would treat this as WM_PROTOCOLS:WM_DELETE_WINDOW, which it'd translate to clutter_actor_destroy(stage). Destroying the stage in such a way is not expected, and caused wierd crashes in different places depending on what was going on. This commit make sure we only treat WM_PROTOCOLS client messages as WM_PROTOCOLS client messages effectively avoiding the issue. This fixes crashes such as: #0 meta_window_get_buffer_rect (window=0x0, rect=rect@entry=0x7ffd7fc62e40) at core/window.c:4396 #1 0x00007f1e2634837f in get_top_visible_window_actor (compositor=0x297d700, compositor=0x297d700) at compositor/compositor.c:1059 #2 meta_compositor_sync_stack (compositor=0x297d700, stack=<optimized out>, stack@entry=0x26e3140) at compositor/compositor.c:1176 #3 0x00007f1e263757ac in meta_stack_tracker_sync_stack (tracker=0x297dbc0) at core/stack-tracker.c:871 #4 0x00007f1e26375899 in stack_tracker_sync_stack_later (data=<optimized out>) at core/stack-tracker.c:881 #5 0x00007f1e26376914 in run_repaint_laters (laters_list=0x7f1e2663b7d8 <laters+24>) at core/util.c:809 #6 run_all_repaint_laters (data=<optimized out>) at core/util.c:826 #7 0x00007f1e26b18325 in _clutter_run_repaint_functions (flags=flags@entry=CLUTTER_REPAINT_FLAGS_PRE_PAINT) at clutter-main.c:3448 #8 0x00007f1e26b18fc5 in master_clock_update_stages (master_clock=0x32d6a80, stages=0x4e5a740) at clutter-master-clock-default.c:437 #9 clutter_clock_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at clutter-master-clock-default.c:567 #10 0x00007f1e27e48049 in g_main_dispatch (context=0x225b8d0) at gmain.c:3175 #11 g_main_context_dispatch (context=context@entry=0x225b8d0) at gmain.c:3828 #12 0x00007f1e27e483a8 in g_main_context_iterate (context=0x225b8d0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3901 #13 0x00007f1e27e4867a in g_main_loop_run (loop=0x24e29f0) at gmain.c:4097 #14 0x00007f1e2636a3dc in meta_run () at core/main.c:666 #15 0x000000000040219c in main (argc=1, argv=0x7ffd7fc63238) at ../src/main.c:534 and #0 0x00007f93943c1f25 in raise () at /usr/lib/libc.so.6 #1 0x00007f93943ab897 in abort () at /usr/lib/libc.so.6 #2 0x00007f9393e1e062 in g_assertion_message (domain=<optimized out>, file=<optimized out>, line=<optimized out>, func=0x7f93933e6860 <__func__.116322> "meta_x11_get_stage_window", #3 0x00007f9393e4ab1d in g_assertion_message_expr () #4 0x00007f939338ecd7 in meta_x11_get_stage_window (stage=<optimized out>) at ../mutter/src/backends/x11/meta-stage-x11.c:923 #5 0x00007f939339e599 in meta_backend_x11_cm_translate_device_event (x11=<optimized out>, device_event=0x55bc8bcfd6b0) at ../mutter/src/backends/x11/cm/meta-backend-x11-cm.c:381 #6 0x00007f939339f2e2 in meta_backend_x11_translate_device_event (device_event=0x55bc8bcfd6b0, x11=0x55bc89dd5220) at ../mutter/src/backends/x11/meta-backend-x11.c:179 #7 0x00007f939339f2e2 in translate_device_event (device_event=0x55bc8bcfd6b0, x11=0x55bc89dd5220) at ../mutter/src/backends/x11/meta-backend-x11.c:208 #8 0x00007f939339f2e2 in maybe_spoof_event_as_stage_event (input_event=0x55bc8bcfd6b0, x11=0x55bc89dd5220) at ../mutter/src/backends/x11/meta-backend-x11.c:284 #9 0x00007f939339f2e2 in handle_input_event (event=0x7fff62d60490, x11=0x55bc89dd5220) at ../mutter/src/backends/x11/meta-backend-x11.c:309 #10 0x00007f939339f2e2 in handle_host_xevent (event=0x7fff62d60490, backend=0x55bc89dd5220) at ../mutter/src/backends/x11/meta-backend-x11.c:413 #11 0x00007f939339f2e2 in x_event_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ../mutter/src/backends/x11/meta-backend-x11.c:467 #12 0x00007f9393e6c39e in g_main_dispatch (context=0x55bc89dd03e0) at ../glib/glib/gmain.c:3179 #13 0x00007f9393e6c39e in g_main_context_dispatch (context=context@entry=0x55bc89dd03e0) at ../glib/glib/gmain.c:3844 #14 0x00007f9393e6e1b1 in g_main_context_iterate (context=0x55bc89dd03e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:3917 #15 0x00007f9393e6f0c3 in g_main_loop_run (loop=0x55bc8a042640) at ../glib/glib/gmain.c:4111 #16 0x00007f9393369a0c in meta_run () at ../mutter/src/core/main.c:676 #17 0x000055bc880f2426 in main (argc=<optimized out>, argv=<optimized out>) at ../gnome-shell/src/main.c:552 Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/338 Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/951 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1317 (cherry picked from commit e5ea8f54)
b002343d -
Corentin Noël authored
invalidate_shadow takes the MetaWindowActorX11 as argument and not the MetaShadowFactory. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1314 (cherry picked from commit e09ac676)
ecc2b910 -
Sebastian Keller authored
This flag was using the same value as the NO_CURSORS flag. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1321
f25417ef -
The size of the buffer the texture will be written to by paint_to_buffer() is determined based on meta_screen_cast_area_stream_src_get_specs() which uses roundf() to calculate the width and height after scaling. Because the size of the texture to be written to that buffer is calculated using ceilf(), it might exceed the allocated buffer when using fractional scaling. In 3.36 paint_to_buffer() is used from capture_view() which also uses roundf() to allocate its buffer. Here this leads to a memory corruption resulting in a crash when taking screenshots of an area. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2842 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1320 (cherry picked from commit e216d9c6)
81deb994 -
In commit 4c1fde9d MetaCullable related code was moved out of MetaShapedTexture into MetaSurfaceActor. While generally desirable, this removed drawing optimizations in MetaShapedTexture for partial redraws. The common case for fully obscured actors was still supposed to work, but it was now discovered that it actually did not. This commit revert parts of 4c1fde9d: it reintroduces clipping to MetaShapedTexture but leaves all culling and actor related logic in MetaSurfaceActor. Thanks to Daniel van Vugt for uncovering the issue. Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/850 Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/1295 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1326 (cherry picked from commit 3187fe8e)
44a33581 -
Michel Dänzer authored
This avoids some issues which could happen on some setups[0] due to meta-native-renderer.c:dummy_power_save_page_flip → meta_onscreen_native_swap_drm_fb implicitly turning of the primary plane (by destroying the KMS framebuffer assigned to it): * drmModeObjectSetProperty could return an "Invalid argument" error between setting a non-empty cursor with drmModeSetCursor(2) and enabling the primary plane again: Failed to DPMS: Failed to set connector 69 property 2: Invalid argument (This was harmless other than the error message, as we always re-set a mode on the CRTC after setting the DPMS property to on, which enables the primary plane and implicitly sets the DRM property to on) * drmModeSetCursor(2) could return an "Invalid argument" error between setting the DPMS property to on and enabling the primary plane again: Failed to set hardware cursor (drmModeSetCursor failed: Invalid argument), using OpenGL from now on [0] E.g. with the amdgpu DC display code. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1240 (cherry picked from commit 2e5b767c)
cc617b05 -
Jonas Ådahl authored
The backport applied cleanly, but didn't build as function type signatures called changed. This fixes the compilation issues.
1f896c97 -
Robert Mader authored
This reverts commit 493aeb65. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1330
849d8dfa -
Robert Mader authored
This reverts commit 36f5a0a4. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1330
78248d8d -
The split wasn't 100% clean, and some extra private API had to be added for it (but well, looking at the API, it's already evident there's a cleanup/streamlining task due). This is meant to be a refactor with no functional changes, so just go with it. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1193 (cherry picked from commit 6a3d5214)
b98125a3 -
Following the MetaWaylandDataSource split, this goes next. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1193 (cherry picked from commit 317f6c09)
1eb0812f -
This is still an openly defined struct, as we will need accessed by "subclasses". Same principle applies than with the MetaWaylandDataSource refactor, this is not meant to introduce functional changes, so just go with it. On the bright side, the interactions are now clearer, so it could be made saner in the future. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1193 (cherry picked from commit 91ef7515)
b52a0be2 -
Following the MetaWaylandDataOffer split. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1193 (cherry picked from commit 4726f3d5)
8b69e790 -
Instead of having everything clumped at MetaWaylandDataManager, split the primary selection to its own struct. This manager is handled separately from wl_data_device_manager and other selection managers, so they would be able to interoperate between them, even. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1193 (cherry picked from commit 5e8d8b9a)
e98e1c13 -
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1193 (cherry picked from commit b7366b5b)
5c7b5ef0 -
Make the data device track the keyboard focus, and use that list to forward the clipboard selection to all data devices from the same client. This is however not the case of DnD data offers, as the semantics of multiple in-flight offers is unclear. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1250 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1253 (cherry picked from commit 7e4e3714)
1ec91cc8 -
Make the data device track the keyboard focus, and use that list to forward the primary selection to all data devices from the same client. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1253 (cherry picked from commit b45d5ef3)
d7217504 -
We want to make room for the wayland-protocols primary selection protocol. Rename our private protocol as "legacy". https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1255 (cherry picked from commit 037b68ab)
9acb8236 -
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1255 (cherry picked from commit 55f5177f)
76e4b5de -
This protocol was added some time ago. Supporting it fell through the cracks. Add new data device/source/offer implementations for it, interoperation between primary selection protocols (and X11 primary selection for that matter) comes for free. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/943 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1255 (cherry picked from commit 2becb3dd)
59cb259f -
When an app disappears after some data from it has been copied to the clipboard, the owner of the clipboard selection becomes a new memory selection source. The initial reference this new selection source is never unref'ed, which leads to this being leaked on the next clipboard selection owner change. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1293 (cherry picked from commit a031ac06)
ef848f10 -
The clipboard manager is the only code to ever set the display selection source, so it should also be responsible for unsetting it when the clipboard manager gets shut down. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1293 (cherry picked from commit 019643ba)
bb4bd4b5 -
They were only being closed but never freed. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1293 (cherry picked from commit dd32ff01)
70072c39 -
"offer" is overwritten with the result of meta_wayland_data_offer_new a few lines later. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1293 (cherry picked from commit 99c9f4c1)
b8bd3979 -
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1295 (cherry picked from commit be59b514)
a83d83f0 -
The subsurface state may affect the geometry end result, e.g. when window decoration enlarging the toplevel window are applied. If we don't wait with calculating the window geometry, intersecting the set region with the subsurface tree extents will not include the subsurfaces. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/928 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1295 (cherry picked from commit d6af5961)
9b349cb2 -
We already used the actual API in the same function, move that call a bit higher up to and use the variable in more places. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1295 (cherry picked from commit 4c0aa2af)
36a6235f -
We were setting the pipeline colour to all white (1.0, 1.0, 1.0, 1.0) and so the default layer combine function multiplied each pixel (R, G, B, A) by all ones. Obviously multiplying by one four times per pixel is a waste of effort so we remove the colour setting *and* set the layer combine function to a trivial shader that will ignore whatever the current pipeline colour is set to. So now we do **zero** multiplies per pixel. On an i7-7700 at UHD 3840x2160 this results in 5% faster render times and 10% lower power usage (says intel_gpu_top). The benefit is probably much higher for virtual machines though, as they're no longer being asked to do CPU-based math on every pixel of a window. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1331 (cherry picked from commit e5542c32)
3a70ba7a -
Olivier Fourdan authored
The portal API requires a screencast session only for absolution motion with remote desktop, other methods including relative motion do not require a screencast session. There is no reason to be more strict than the API actually is, check for a screencast session only when required, like for absolute motion events and touch events. Tested with https://gitlab.gnome.org/snippets/1122 Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1307 (cherry picked from commit b8524504)
86d9cd1a -
Robert Mader authored
41130b08 added a fix for culling subsurfaces with geometry scale. Unfortunately it only did so for the opaque regions, not for clip and unobscured regions, as the effect was hidden by bug that was only fixed by 3187fe8e. Apply the same fix to clip and unobscured regions and use the chance to move most of the slightly hackish geometry scale related code into a single place. We need to scale slightly differently in the two cases, indicated by the new `ScalePerspectiveType` enum, as the scale is dependent on the perspective - once from outside, once from inside of the scaled actor. Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/1312 (cherry picked from commit 86646679)
ae8acc99 -
If the event originates from a XSetSelectionOwner request, the event will contain a XFixesSetSelectionOwnerNotify subtype. The other subtypes (meant for the selection window being destroyed, and the client closing) are the situations where we mean to replace the selection. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1268 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1350 (cherry picked from commit 2f1f47d2)
45487524 -
Jonas Dreßler authored
ClutterBoxLayout calculates the preferred size of the opposite orientation (so for example the height if the orientation is horizontal) by getting the preferred size of the real orientation first, and then the preferred size of the opposite orientation, using the other size as for_width/height when doing the request. Right now, for non-homogeneous layouts this for_width/height does not adjust for the spacing set on the box layout. This leads to children being passed a slightly larger for_width/height, which in case of ClutterText might cause the line to not wrap when it actually should. This in turn means we can end up with an incorrect preferred size for the opposite orientation, leading to a wrong allocation. So fix that and adjust for the spacing just as we do for homogeneous layouts by subtracting the total spacing from the available size that is distributed between children. This fixes the wrong height of the checkbox label reported in https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2574. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1333
77dc3a50 -
Jonas Dreßler authored
In case the layout is homogeneous, all children aligned by the box layout must be allocated the same size. In order to fit them all inside the container, the size request of the box layout has to look for the child with the largest size and use that size for all children. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2737 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1333
c2146b45 -
Florian Müllner authored
Update NEWS.
d03deb00 -
Marco Trevisan authoredf57ec26e
-
Marco Trevisan authored
Upstream version 3.36.4
20f6d01f -
Marco Trevisan authoredda079598
-
Marco Trevisan authored441d4dd7
-
Marco Trevisan authored1a7f5548
-
Marco Trevisan authorede76f340a
-
Marco Trevisan authoredc859cb93