summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* cogl: Add libsysprof capture based tracingJonas Ådahl2019-05-318-0/+354
| | | | | | | | | | | | | | | | | | | | | | | Add the ability to add tracing instrumentation to the code. When enabled, trace entries will generate a file with timing information that will be processable by sysprof for generating visualization of traces over time. While enabled by default at compile time, it is possible to disable the expansion of the macros completely by passing --disable-tracing to ./configure. Tracing is so far only actually done if actually enabled on explicitly specified threads. This will be used by Mutter passing the write end of a pipe, where the read end is sent to Sysprof itself via the D-Bus method 'Capture()'. By passing that, we have to detect EPIPE that is sent when Sysprof stops recording. Fortunately, we already ignore the signal at meta_init(), so no need to add a custom signal handler. https://gitlab.gnome.org/GNOME/mutter/merge_requests/197
* wayland: Update tablet cursor outputs across cursor/proximity changesCarlos Garnacho2019-05-311-3/+14
| | | | | | | | Make sure those generic surface events are sent early on when setting a cursor for any tablet tool, so clients can update to output characteristics. https://gitlab.gnome.org/GNOME/mutter/merge_requests/545 Related: https://gitlab.gnome.org/GNOME/gtk/issues/1675
* wayland: Handle NULL cursor renderer finding the outputs of a cursor roleCarlos Garnacho2019-05-311-0/+3
| | | | | | | | Having a cursor role with a NULL renderer is valid state, and even desirable on tablets (eg. after proximity out). In those cases it should be interpreted as the cursor surface not being over any output. https://gitlab.gnome.org/GNOME/mutter/merge_requests/545
* compositor: Emit 'grab-op-end' signal after ungrab happenedMarco Trevisan (Treviño)2019-05-291-4/+6
| | | | | | | | | | | | | | We're currently emitting the 'grab-op-end' signal when the grab prerequisites are met, but when display->grab_op is still set to a not-NONE value and thus meta_display_get_grab_op() would return that in the signal callback. And more importantly when this is emitted, devices are still grabbed. Instead, emit this signal as soon as we've unset all the grab properties and released the devices. Helps with https://gitlab.gnome.org/GNOME/gnome-shell/issues/1326 https://gitlab.gnome.org/GNOME/mutter/merge_requests/596
* display: Emit 'grab-op-end' signal after ungrab happenedMarco Trevisan (Treviño)2019-05-291-3/+3
| | | | | | | | | | | | | | We're currently emitting the 'grab-op-end' signal when the grab prerequisites are met, but when display->grab_op is still set to a not-NONE value and thus meta_display_get_grab_op() would return that in the signal callback. And more importantly when this is emitted, devices are still grabbed. Instead, emit this signal as soon as we've unset all the grab properties and released the devices. Helps with https://gitlab.gnome.org/GNOME/gnome-shell/issues/1326 https://gitlab.gnome.org/GNOME/mutter/merge_requests/596
* wayland: Honor startup sequence workspace on .request_focusCarlos Garnacho2019-05-291-1/+4
| | | | | | | | | | | | | | | | | We handle this in backend specific code for x11, so do the wayland bits here. We can only honor this on applications that request focus on a surface after a startup request, as we do need an explicit surface to apply the workspace on (and we don't have additional clues like WMCLASS on X11). Notably, gtk_shell1.notify_startup doesn't suffice. Another gotcha is that the .request_focus happens when the surface is already "mapped". Due to the way x11 and the GDK api currently work (first reply on the startup id, then map a window, then request focus on that window). This means the surface will ignore at this point window->initial_workspace, so it must be actively changed. https://gitlab.gnome.org/GNOME/mutter/merge_requests/544 Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/674
* wayland: Unset DnD selection on wl_data_offer destructionCarlos Garnacho2019-05-291-2/+6
| | | | | | | | | | | | | | | | | | | | | On a successful DnD operation we may expect the wl_data_source and wl_data_offer to live long enough to finish the data transfer, despite the grab operation (and other supporting data) being gone. When that happens, the compositor expects a wl_data_offer.finish request to notify that it finished. However the client may still chose not to send that and destroy the wl_data_offer instead, resulting in the MetaSelectionSource owner for the DnD selection not being unset. When that happens, the DnD MetaSelectionSource still exists but it's detached from any grab operation, so will not be unset if eg. the drag source client destroys the wl_data_source. This may result in crashes when the next drag operation tries to replace the owner DnD MetaSelectionSource. Check explicitly for this case, in order to ensure the DnD owner is unset after such operations. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/591
* meson: Do not add compiler flags if 'plain' buildtype is usedRobert Mader2019-05-291-41/+42
| | | | | | That is how the 'plain' buildtype is meant in meson. https://gitlab.gnome.org/GNOME/mutter/merge_requests/497
* meson: Cleanup debug build handlingRobert Mader2019-05-293-16/+19
| | | | | | | | | | | | | | | | | | Add debug flags based on meson's `debug` option instead of `buildtype`. This allows custom build configurations to behave like a debug or release build. Add `-fno-omit-frame-pointer` to Mutter/Cogl. Not to Clutter though, as that would require more changes to how Clutter's gir is created Remove `-DG_DISABLE_CAST_CHECKS` from Clutter in debug builds Add `-DG_DISABLE_CHECKS`, `-DG_DISABLE_ASSERT` and `-DG_DISABLE_CAST_CHECKS` to all non-debug builds but `plain`, which explicitly should not have any compile flags Use `cc.get_supported_arguments`, so it becomes more obvious to the user which flags are set during compilation https://gitlab.gnome.org/GNOME/mutter/merge_requests/497
* renderer/native: Refactor into secondary_gpu_get_next_dumb_bufferPekka Paalanen2019-05-291-29/+23
| | | | | | | | | Extract the next buffer -logic into a new function. This allows to simplify copy_shared_framebuffer_cpu () making it more readable. This change is a pure refactoring, no functional changes. https://gitlab.gnome.org/GNOME/mutter/merge_requests/593
* boxes: Fix calculation of rounded rectanglesRobert Mader2019-05-291-2/+2
| | | | | | | Since 68fba458 the function is used for more calculations, exposing a bug when used with fractional scaling. https://gitlab.gnome.org/GNOME/mutter/issues/609
* x11-display: Simplify bell handlingFlorian Müllner2019-05-281-32/+7
| | | | | | | | | Since commit 956ab4bd made libcanberra mandatory, we never use the system bell for handling the `audible-bell` setting. So instead of reacting to settings changes with the exact same call to XkbChangeEnabledControls(), just call it once when initializing. https://gitlab.gnome.org/GNOME/mutter/merge_requests/598
* workspace-manager: Remove unnecessary assignmentFlorian Müllner2019-05-281-2/+0
| | | | | | | The initialization to -1 is never used, instead the variables are re-initialized to 0 before the loop that uses them. https://gitlab.gnome.org/GNOME/mutter/merge_requests/598
* input-mapper: Remove unnecessary return valueFlorian Müllner2019-05-281-12/+3
| | | | | | | Since commit ae6d9e35bd, there is a fallback to META_MATCH_IS_BUILTIN, so the condition for returning FALSE is never met. https://gitlab.gnome.org/GNOME/mutter/merge_requests/598
* renderer-x11-nested: Fix copy-and-paste errorFlorian Müllner2019-05-281-1/+1
| | | | | | | The rounding added in commit c5471e5b8b1 mixed up some variables, whoops. https://gitlab.gnome.org/GNOME/mutter/merge_requests/598
* cogl-path: Undeprecate framebuffer functionsFlorian Müllner2019-05-272-9/+0
| | | | | | | | | | | It looks like deprecating the functions with explicit framebuffer/pipeline arguments made it to (cogl) master by mistake: https://mail.gnome.org/archives/clutter-list/2016-April/msg00008.html We now use one of them, so this is a good time to undeprecate the lot. https://gitlab.gnome.org/GNOME/mutter/merge_requests/597
* headless-start-test: Ignore frame counter warningsMarco Trevisan (Treviño)2019-05-271-0/+19
| | | | | | | | | When running in slow or busy machines (hey CI!) or under valgrind headless tests could fail because of a non fatal warning during initialization. So define a fatal handler that ignores the frame counter warning. https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
* test-runner: Always wait after creating a windowMarco Trevisan (Treviño)2019-05-271-0/+3
| | | | | | | | | | | | Creating a window could take some time, causing false-positive failures when running in slower or busy hardware like: window 1/2 isn't known to Mutter So before we proceed in doing any operation on it, wait for the client. Do this in the test runner instead of repeating the same in every .metatest. https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
* gitlab-ci: Use G_SLICE=always-malloc in testsMarco Trevisan (Treviño)2019-05-271-0/+1
| | | | | | This allows to catch errors better, as per MALLOC_CHECK_'s definition https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
* gitlab-ci: Print error logs on failuresMarco Trevisan (Treviño)2019-05-271-1/+1
| | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
* cogl/pipeline: Don't try to access to free'd pointer dataMarco Trevisan (Treviño)2019-05-271-3/+3
| | | | | | | | | | | When free'ing a pipeline we destroy the BigState first and then the fragment and vertex snippets lists using the big state pointer which is now invalid. This causes a crash when G_SLICE=always-malloc is set and using MALLOC_CHECK_. So, invert the operations by free'ing the snippet lists first, and the big state afterwards. https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
* cogl/xlib-renderer: Save Xlib renderer data in custom winsys pointerMarco Trevisan (Treviño)2019-05-271-19/+7
| | | | | | | | | | | | | | | | | | | XLib renderer saves its data as the object cogl user data, however this data is free'd as part of the object destruction that happens before free'ing the renderer in _cogl_renderer_free(), from where we're calling the renderer disconnect vfunc. Thus in _cogl_xlib_renderer_disconnect() we happen to get an invalid pointer to CoglXlibRenderer and we try access to it in order to close the X11 display. This causes all the cogl tests to crash when G_SLICE=always-malloc is set and when using MALLOC_CHECK_. Fix this using the renderer winsys custom data instead of using cogl object data for storing the CoglXlibRenderer, and handling the destruction of it manually. As bonus this also makes access to the renderer data faster. https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
* clutter/tests/actor-destroy: Check destroying the actor clears the childrenMarco Trevisan (Treviño)2019-05-271-2/+3
| | | | | | | | | | | | | | Commit df7d8e2cb highlights a crash on test_destroy_destroy, in fact it could happen that calling clutter_actor_destroy on a child while iterating on the list, would implicitly call test_destroy_remove that tries to modify the list at the same time. Causing a memory error. So instead of manually free the children list, just ensure that this list is valid and that when the object destruction is done, this is free'd. See: https://gitlab.gnome.org/GNOME/mutter/merge_requests/576 https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
* wayland-seat: Use g_free to cleanup MetaWaylandSeatMarco Trevisan (Treviño)2019-05-271-1/+1
| | | | | | | MetaWaylandSeat is allocated using g_new0(), and thus we should use g_free() to destroy it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
* cursor-renderer-native: Free MetaCursorNativePrivate structMarco Trevisan (Treviño)2019-05-271-0/+1
| | | | | | Fix a small leak in native renderer. https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
* theme: Remove DEBUG_FILL_STRUCTMarco Trevisan (Treviño)2019-05-271-4/+0
| | | | | | | | This debug statement is actually applied all the times, while it could be useful for crashes analysis, these days the same can be done using `MALLOC_CHECK_` and `MALLOC_PERTURB_` env variables. https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
* boxes: Use G_DEFINE_BOXED_TYPE to define the typeMarco Trevisan (Treviño)2019-05-271-11/+2
| | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
* display: Cleanup Edges when display is closedMarco Trevisan (Treviño)2019-05-271-1/+1
| | | | | | | This could happen if closing the display when dragging a window, unlikely, but better to use the cleanup function since we have it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
* clutter-text: Fix selection color drawingFlorian Müllner2019-05-271-1/+10
| | | | | | | | | | | | Commit cabcad185 removed the call to cogl_set_source_color4ub() before cogl_fill_path(), so instead of the previously assigned selection color, the background is drawn with the last set source. In order to honour the newly added framebuffer parameter and still apply the correct color, switch from cogl_fill_path() to the (deprecated!) cogl_framebuffer_fill_path() method. https://gitlab.gnome.org/GNOME/mutter/issues/494
* wayland: Drop -terminate argument to XwaylandCarlos Garnacho2019-05-241-7/+1
| | | | | | | | | | | | | | | | This argument instructs Xwayland to exit when there are no further client connections. However we eventually want to handle restarts ourselves (where, notably, mutter's will be at least the last client connection). This behavior could also induce race conditions on startup with clients that quickly open and close a display, which is a more pressing issue. Also, add -noreset back (which was also removed in commit 054c25f693 that added -terminate). We don't want to reset the X server to a pristine state in that situation either. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* wayland: Drop error trapCarlos Garnacho2019-05-241-21/+7
| | | | | | | | Code underneath seems to handle errors properly, or be x11-agnostic entirely, this is apparently here to save a few XSync()s on X11. Just drop this windowing dependent bit to make things cleaner. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* compositor: Drop error trapCarlos Garnacho2019-05-241-5/+0
| | | | | | | | Code underneath seems to handle errors properly, and this is apparently here to save a few XSync()s on X11. Just drop this windowing dependent bit to make things cleaner. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* wayland: Split Xwayland initialization in 2 stepsCarlos Garnacho2019-05-242-19/+19
| | | | | | | | | | | It is now separated into meta_xwayland_start(), which picks an unused display and sets up the sockets, and meta_xwayland_init_xserver(), which does the actual exec of Xwayland and MetaX11Display initialization. This differentiation will be useful when Mutter is able to launch Xwayland lazily, currently the former calls into the latter. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* x11: Initialize GdkDisplay together with MetaX11DisplayCarlos Garnacho2019-05-242-16/+3
| | | | | | It's no longer a "singleton", since it might be closed and opened again. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* x11: Unmanage X11 windows on MetaX11Display finalizationCarlos Garnacho2019-05-241-0/+22
| | | | | | | This used to be relied upon meta_display_close(), but MetaDisplay and MetaX11Display lifetimes may be unrelated. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* core: Add explicit init/shutdown_x11() MetaDisplay callsCarlos Garnacho2019-05-242-11/+40
| | | | | | | The lifetime of MetaX11Display is still tied to MetaDisplay, but these calls will be useful when it's actually affordable to decouple those. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* core: Untangle input focus managementCarlos Garnacho2019-05-249-91/+89
| | | | | | | | | | | | In all places (including src/wayland) we tap into meta_x11_display* focus API, which then calls meta_display* API. This relation is backwards, so rework input focus management so it's the other way around. We now have high-level meta_display_(un)set_input_focus functions, which perform the backend-independent maintenance, and calls into the X11 functions where relevant. These functions are what callers should use. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* x11: Separate X11 focus handling into MetaX11Display methodCarlos Garnacho2019-05-245-43/+50
| | | | | | | | Updating the MetaWindow focus and the X Window focus is interrelated but independent. Call one after the other in the places we handle window focus changes. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* core: Relax requirement that MetaWindow shall have icon/mini-iconCarlos Garnacho2019-05-241-55/+2
| | | | | | | | | | | | | We use a GtkIconTheme (thus icon-theme, thus xsettings, thus x11) just to grab a "missing icon" icon to show in place. Relax this requirement that surfaces for icon/mini-icon will be set, and just let it have NULL here. It seems better to have the callers (presumably UI layers) aware of this and set a proper icon by themselves, but AFAICS there is none in sight, not even plain mutter seems to use MetaWindow::[mini-]icon. Probably worth a future cleanup. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* x11: Move X11 calls to map/unmap a MetaWindow to MetaWindowX11Carlos Garnacho2019-05-244-10/+41
| | | | | | Add 2 vmethods so that MetaWindowX11 may handle the X11 calls itself. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* core: Separate checks for pointer barriers availabilityCarlos Garnacho2019-05-241-4/+6
| | | | | | | | If the check happens on --nested (X11 backend) while there is no X11 display we would get a crash. Since the barriers are non-effective on nested, just take it out into a separate condition. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* core: Avoid grab transfer shenanigans with non-X11 backendCarlos Garnacho2019-05-241-8/+11
| | | | | | | | | | | This explicit ungrab is made to ensure the other X11 display connection is able to start an active grab immediately on the device without receiving AlreadyGrabbed. This is just relevant if there's two X11 display connections to transfer grabs across, which may just happen on X11 windowing. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* x11: Add MetaX11Stack objectCarlos Garnacho2019-05-247-278/+458
| | | | | | | | | | | | This object takes care of the X11 representation of the window stack, namely the _NET_CLIENT_LIST and _NET_CLIENT_LIST_STACKING root window properties. This code has been lifted from src/core/stack.c into src/x11 as it's dependent on the X11 display availability. This also leaves MetaStack squeaky clean of x11 specifics. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* core: Turn MetaStack into a GObjectCarlos Garnacho2019-05-243-29/+136
| | | | | | So we can have it emit signals and whatnot. Those are unused, yet. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* x11: Move focus sentinel to MetaX11DisplayCarlos Garnacho2019-05-246-46/+48
| | | | | | | | This focus sentinel is a mechanism to avoid some X11-specific race conditions in focus-follows-pointer, using X11 mechanisms. Move it to MetaX11Display altogether. https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
* window: Move all attached windows with parentJonas Ådahl2019-05-241-2/+2
| | | | | | | | | | | | | | We'd break the loop for moving attached windows at the first window, meaning we'd only ever move a single attached dialogs or popup if it was the first window in the list. This doesn't work out well when there are multiple popups open, so don't break out of the loop at all until all windows are potentially moved. This fixes an issue in gtk4 where one or more non-grabbing popups would end up unattached if there were more than one and the parent window was moved. https://gitlab.gnome.org/GNOME/mutter/merge_requests/592
* backends/x11: Do not reload keymap on new keyboard notificationsCarlos Garnacho2019-05-241-1/+0
| | | | | | | | | | | | | | | XkbNewKeyboardNotify informs the client that there is a new keyboard driving the VCK. It is essentially meant to notify that the keyboard possibly has a different range of HW keycodes and/or a different geometry. But the translation of those keycodes remain the same, and we don't do range checks or geometry checks (beyond using KEY_GRAVE as "key under Esc", but that is hardly one). It seems we can avoid the busywork that is releasing all our passive grabs, reloading the keymap and regenerating the keycombos and restoring the passive grabs. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/398
* ci: Make MALLOC_PERTURB_ less randomJonas Ådahl2019-05-241-1/+1
| | | | | | | | | | The point is to not initialize to some non-zero value to find places incorrectly relying on blocks being zero initialized. Thus, there is no reason to have a different random number each time, and by having it the same, we have slightly more reproducable triggers, would we ever trigger anything due to this. https://gitlab.gnome.org/GNOME/mutter/merge_requests/591
* ci: Run dconf update before running testsJonas Ådahl2019-05-241-0/+1
| | | | | | | | | | | Otherwise tests will fail due to the following warning: (mutter-test-runner:3700): dconf-WARNING **: 06:39:42.124: unable to open file '/etc/dconf/db/local': Failed to open file “/etc/dconf/db/local”: open() failed: No such file or directory; expect degraded performance https://gitlab.gnome.org/GNOME/mutter/merge_requests/591
* Bump version to 3.33.23.33.2Florian Müllner2019-05-222-1/+16
| | | | Update NEWS.