summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* clutter: Drop clutter_input_device_get_device_id()Carlos Garnacho2020-11-184-57/+61
| | | | | | | Move the GObject property to MetaInputDeviceX11, and throw away the rest. This is no longer public API. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1569>
* backends/native: Don't fake device IDsCarlos Garnacho2020-11-182-56/+1
| | | | | | Stop making them up, they go nowhere. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1569>
* backends/x11: Move to backend-specific meta_input_device_x11_get_device_id()Carlos Garnacho2020-11-186-24/+38
| | | | | | | Make this info part of the MetaInputDeviceX11, as it's actually just relevant to that backend. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1569>
* clutter/main: Drop usage of clutter_input_device_get_device_id()Carlos Garnacho2020-11-181-4/+4
| | | | | | Just print the name in those debug logs. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1569>
* tests: Drop usage of clutter_input_device_get_device_id()Carlos Garnacho2020-11-181-11/+7
| | | | | | We already print device names there. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1569>
* clutter/event: Drop clutter_event_get_device_id()Carlos Garnacho2020-11-182-25/+0
| | | | | | Drop this odd shortcut, it is now unused. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1569>
* core: Move away from clutter_event_get_device_id()Carlos Garnacho2020-11-181-1/+3
| | | | | | Fetch the device, and the ID from there. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1569>
* tests: Drop usage of clutter_event_get_device_id()Carlos Garnacho2020-11-181-23/+28
| | | | | | Use device names there instead. Doesn't seem to matter much. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1569>
* clutter/click-action: Move away from device IDsCarlos Garnacho2020-11-181-4/+4
| | | | | | Store the press device itself, not its ID. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1569>
* clutter/stage-cogl: Avoid copying fb_clip_regionDaniel van Vugt2020-11-181-1/+1
| | | | | | | Because it gets destroyed (unreferenced) immediately after that. This avoids a deep copy of potentially kilobytes of data. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1572>
* region-utils: Always use FLT_EPSILON when comparing floating point valuesRobert Mader2020-11-161-6/+9
| | | | | | | | As you should always do. Using the `float` variant even if `scale` is a `double` as values passed in are potentially computed at `float` precission. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1565>
* region-utils: Reduce temporary allocationsRobert Mader2020-11-161-16/+13
| | | | | | | This applies the optimizations from 0c55e87d8fb70848e to serveral similar places in region-utils. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1565>
* gitlab-ci.yml: Removed unnecessary when:Jonas Ådahl2020-11-161-1/+0
| | | | | | It resulted in failed instead of skipped jobs. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1567>
* ci: Make check-commit-log run againJonas Ådahl2020-11-161-0/+12
| | | | | | It needs 'only: merge_request' to get the necessary env variables. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1567>
* renderer/native: Add udev rule to select primary GPUJonas Ådahl2020-11-165-3/+49
| | | | | | | | | | | | | | | | | | | | | | Sometimes the automatically selected primary GPU isn't suitable with no way to make an well educated guess to do it better. To make it possible for the user to override the automatically calculated default, make it possible to override it using a udev rule. E.g. to select /dev/dri/card1 as the primary GPU, add a file e.g. /usr/lib/udev/rules.d/61-mutter-primary-gpu.rules (path my vary depending on distribution) containing the fellowing line: ENV{DEVNAME}=="/dev/dri/card1", TAG+="mutter-device-preferred-primary" Reboot or manual triggering of udev rules to make it take effect may be required. Related: https://gitlab.gnome.org/GNOME/mutter/merge_requests/1057 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1562 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1562>
* cursor-sprite/xcursor: Fall back to gray square if missing themeJonas Ådahl2020-11-161-5/+20
| | | | | | | | | | | | Instead of aborting with an error, display a half transparent gray square instead of cursors and log a warning in the journal, allowing the user to fix their system withotu having to rely on switching to a TTY. It will be immediately obvious the cursor is silly looking, which will be a better hint than just aborting. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1428 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1563>
* ci: Wait for review stage before continuingJonas Ådahl2020-11-162-25/+5
| | | | | | | | | | | | | | | | | If review fails, it'll fail very early in the pipeline, but we won't see the test case failure until the whole pipeline succeeds, which might be 10 minutes later. To avoid sitting there wondering why it failed, let the time consuming jobs wait until the review stage, which tends to take less than 20 seconds, succeeds. This way the review test result will be presented earlier. This changes the pipeline to run the check-commit-log job also for non-merge requests, with the difference being that it will pass immediately if it's not a merge request. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
* ci/check-commit-log: Generate JUnit reportJonas Ådahl2020-11-162-21/+73
| | | | | | | This will make it less horrible when commit message doesn't pass the compliance checks. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
* ci/check-commit-log: Check capitalizationJonas Ådahl2020-11-161-0/+5
| | | | | | | To avoid commit messages such as 'window: don't capitalize title', and instead enforce 'window: Capitalize title'. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
* ci/check-commit-log: Inverse merge request URL checkJonas Ådahl2020-11-161-4/+4
| | | | | | | | It's from now on the responsibility of marge-bot to append merge request urls to commit messages, so they should not be part of the commit message itself. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
* ci/check-commit-log: Ensure valid cogl and clutter prefixesJonas Ådahl2020-11-161-0/+10
| | | | | | | | | Clutter is a "scope", so everything under should be its own "sub-prefix", e.g. changes to ClutterActor should be prefixed 'clutter/actor', ClutterFrameClock with 'clutter/frame-clock', CoglFramebuffer with 'cogl/framebuffer' etc. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
* mutter.doap: Add marge-bot as a maintainerJonas Ådahl2020-11-161-0/+6
| | | | | | | | | So that it can merge things with an even more locked down master branch. It's given the name "Marge Bot", and the E-mail "gnome-shell-list@gnome.org" (even though it's being decomissioned) to make validators happy. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1564
* ci: Run tests with 10 Hz dummy monitorsJonas Ådahl2020-11-091-0/+2
| | | | | | | This decreases flakyness of some tests when runners are under heavy load. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1555
* tests/stage-view: Tweak test to make less racyJonas Ådahl2020-11-091-1/+1
| | | | | | | | | | | It'd happen that the test runner would get CPU starved, and not see the frame-clock changed notification before the timeline stopped. Decrease the risk for this by moving the initial position of the actor having its position transitioned to be closer to the view edge. This means the frame clock will be changed earlier, increasing the chance of the timeline not stopping before the relayout happens. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1555
* tests/clutter: Disable X11 client supportJonas Ådahl2020-11-093-0/+16
| | | | | | | | This avoids test failure happening due to Xwayland getting the CPU time instead of the tests themself, causing failures e.g. due to missing frames. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1555
* tests/clutter/timeline: Always print progress to stderrJonas Ådahl2020-11-091-30/+20
| | | | | | This helps when the errors happen e.g. in CI pipelines. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1555
* backends/x11: Emit CLUTTER_DEVICE_ADDED events for initial devicesCarlos Garnacho2020-11-073-0/+28
| | | | | | This is similar to commit b9e5a2d6e23, but for the X11 backend. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1553
* clutter/event: Do not filter out DEVICE_ADDED/REMOVED eventsCarlos Garnacho2020-11-071-1/+3
| | | | | | | These devices in x11 are "disabled", that doesn't mean we should refrain from notifying about them. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1553
* xwayland: Match applications without WM_CLASS nor WM_NAMEOlivier Fourdan2020-11-061-2/+14
| | | | | | | | | | | | | | | | For X11 grabs, the pattern matching mechanism would simply ignore applications which have neither WM_CLASS nor WM_NAME set. When dealing with an override redirect window however, it is not uncommon that these window have neither value set as these window are supposed to be ignored by the window manager. When the WM_CLASS or the WM_NAME is not set by the client, assume the value is empty so the pattern matching can allow for these. https://gitlab.gnome.org/GNOME/mutter/-/issues/1249 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1254>
* tests/wayland: Add test for circular subsurfacesJonas Ådahl2020-11-053-0/+196
| | | | | Add tests cases for the tests described in https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1550.
* wayland/subsurface: Check for circular relationshipsRobert Mader2020-11-051-0/+21
| | | | | | | If a subsurface is equal to or an ancestor of the parent surface we currently crash. Check for that case and terminate the client. Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/1521
* x11/output: Fix init tile info guardJonas Ådahl2020-11-051-1/+1
| | | | | | | | | Monitor tile info is possible to fetch when RANDR version 15 is exposed by the X11 server. We had inverted the check meaning that only if older versions were advertised would we attempt to init the tile information. Fix this guard, thus fix monitor tiling on X11. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1524
* clutter/stage: Add documentation and annotationsCorentin Noël2020-11-042-3/+32
| | | | | | | Increase the documentation coverage and add some missing annotations to be able to use some methods correctly with the GObject Introspection. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1545>
* clutter/actor: Queue redraw on no-layout parents when unmappingJonas Dreßler2020-11-031-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | As explained in https://gitlab.gnome.org/GNOME/mutter/-/issues/1494, with commit 29caa5bea576ed056aa6c82de192426abe6019ae we stopped queueing a relayout for the parent of the removed actor in clutter_actor_remove_child_internal(). This relayout was, as opposed to the relayout in clutter_actor_real_hide()/clutter_actor_real_unmap(), queued unconditionally without looking at the parents NO_LAYOUT flag. Now while that relayout in clutter_actor_remove_child_internal() would do unnecessary work if the parent had the NO_LAYOUT flag set, it did also queue a redraw of the parent, which is necessary in any case. So by removing that relayout in clutter_actor_remove_child_internal(), we stopped queueing redraws for NO_LAYOUT parents when a child gets removed from the scenegraph. This caused bugs where the texture of the child would be left visible on the screen even though the child got destroyed. To fix this, make sure again that we always queue a redraw on the parent when unmapping a child. Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/1494
* Updated Danish translationAsk Hjorth Larsen2020-11-011-38/+72
|
* backend: Update cursor visibility on device addedOlivier Fourdan2020-10-301-33/+14
| | | | | | | | | | | | | | | | Not calling libinput dispatch in the backend constructor defeats the logic in post init as the device added events have not been processed yet. So instead of trying to guess the cursor initial visibility, simply update it along when devices get added. Additional benefit, we do not need to walk the all device list looking for touchscreens anymore, we just need to check the device being added since the current logic is to hide the cursor as soon as a touchscreen is found. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1534
* clutter/backend: Don't dispatch libinput events too earlyOlivier Fourdan2020-10-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | At startup, libinput dispatch is called from the MetaSeatNative constructed callback. That means that we may get libinput events even before the default seat is set. In turn, processing those events may trigger the use the default seat while it's still not set yet, and cause a crash of gnome-shell/mutter at startup. A simple reproducer for this is to start gnome-shell/mutter with a tablet connected and the stylus in proximity, the proximity event will cause gnome-shell/mutter to crash at startup. To avoid that issue, avoid dispatching libinput events early from the MetaSeatNative constructed callback, those events will eventually get processed when the seat and the backend are all setup. https://gitlab.gnome.org/GNOME/mutter/-/issues/1501 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1534
* wayland/window: Don't lose precision in MetaWaylandWindowConfigurationJonas Ådahl2020-10-296-14/+33
| | | | | | | | | | | | | | | | | | Commit 8bdd2aa7 would offset the window position by the difference between the configured window size and the committed size from the client to prevent the window from drifting while resizing. This, however, did not take into account the actual geometry scale, so when using any scale greater than 1, the window would rapidly drift away due to that offset. In order to solve this, we need to make sure we store away the pending window configuration in the stage coordinate space, in order to not loose precision. When we then calculate the offset given the result from the client, it'll use the right scalars, while before, one scalar was in surface coordinates, while the other in stage coordinates. https://gitlab.gnome.org/GNOME/mutter/-/issues/1490
* cursor-tracker: Get the GDK (X11) pointer position in floats, not intsDaniel van Vugt2020-10-281-2/+2
| | | | | | This makes X11 consistent with Wayland which already uses floats. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1519
* cursor-tracker: Check for NULL coordinates before retrieving themDaniel van Vugt2020-10-281-1/+3
| | | | | | | This makes Wayland consistent with X11 in not emitting warnings when unwanted parameters are NULL. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1519
* cursor-tracker: Check if coordinates are NULLDaniel van Vugt2020-10-281-14/+14
| | | | | | | | | To avoid a SEGV on X11. Passing NULL coordinates is perfectly valid if you are only seeking to get the `mods`. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1484 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1519
* ci: Run coverage target by defaultCarlos Garnacho2020-10-281-12/+8
| | | | | | | | | We're just a "ninja coverage" away from getting the full report, it is not that much extra to the pipeline. Also, fix bugs that accumulated since the manual task was added, e.g. let the full built+tested tree available on the coverity stage. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1535
* README: Elaborate coding style and commit message guidelinesJonas Ådahl2020-10-281-6/+44
| | | | | | Spell out some conventions used in the README. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1521
* README: Add link to wikiJonas Ådahl2020-10-281-3/+8
| | | | | | The wiki has gotten a few pages recently, lets link to it. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1521
* background-content: ceilf the actor size instead of roundfDaniel van Vugt2020-10-271-2/+2
| | | | | | | | | | We want the bounding box so `ceilf` seems more appropriate. It was only written using `roundf` before as a workaround for inaccuracies coming out of `clutter_actor_get_transformed_size` that would have tricked `ceilf` into landing on the wrong integer. But that's since been fixed by 67cc60cbda so we can use `ceilf` now. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1532
* drm-buffer-gbm: Clear framebuffer with g_clear_objectGeorges Basile Stavracas Neto2020-10-271-1/+1
| | | | | | Another fallout of eb14da3874fd7044c6ef6bf28bf33b1bfcc7a3a0 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1531
* backend: Keep a refcount on backend's current_deviceOlivier Fourdan2020-10-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we might run into a use-after-free and crash on (virtual) device removal: Invalid read of size 8 at clutter_input_device_get_device_type (clutter-input-device.c:811) by update_last_device (meta-backend.c:1282) by g_main_dispatch (gmain.c:3325) by g_main_context_dispatch (gmain.c:4016) by g_main_context_iterate.constprop.0 (gmain.c:4092) by g_main_loop_run (gmain.c:4290) by meta_run_main_loop (main.c:708) by meta_run (main.c:723) by main (main.c:550) Address is 32 bytes inside a block of size 504 free'd at free (vg_replace_malloc.c:538) by g_type_free_instance (gtype.c:1939) by clutter_event_free (clutter-event.c:1420) by _clutter_stage_process_queued_events (clutter-stage.c:830) by handle_frame_clock_before_frame (clutter-stage-view.c:1064) by clutter_frame_clock_dispatch (clutter-frame-clock.c:405) by frame_clock_source_dispatch (clutter-frame-clock.c:456) by g_main_dispatch (gmain.c:3325) by g_main_context_dispatch (gmain.c:4016) by g_main_context_iterate.constprop.0 (gmain.c:4092) by g_main_loop_run (gmain.c:4290) by meta_run_main_loop (main.c:708) by meta_run (main.c:723) Block was alloc'd at at malloc (vg_replace_malloc.c:307) by g_malloc (gmem.c:106) by g_slice_alloc (gslice.c:1025) by g_slice_alloc0 (gslice.c:1051) by g_type_create_instance (gtype.c:1839) by g_object_new_internal (gobject.c:1939) by g_object_new_valist (gobject.c:2264) by g_object_new (gobject.c:1782) by meta_input_device_native_new_virtual (meta-input-device-native.c:1365) by meta_virtual_input_device_native_constructed (meta-virtual-input-device-native.c:705) by g_object_new_internal (gobject.c:1979) by g_object_new_valist (gobject.c:2264) Suggested-by: Carlos Garnacho <carlosg@gnome.org> https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1529
* clutter/actor: Remove two unused functions in private headerJonas Dreßler2020-10-261-4/+0
| | | | | | | Those two functions are nowhere to be found in our code, so remove those function headers which were probably forgot during another cleanup. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1528
* clutter/stage: Remove redraw_pending and redraw_countJonas Dreßler2020-10-261-22/+0
| | | | | | | | | | | | The redraw_pending boolean is used to schedule the first stage update after starting Clutter. This flag is superfluous because we have the pending_finish_queue_redraws flag which does the same. While at it, also remove the redraw_count debug variable, since there should be better ways to count the number of queued redraws nowadays, for example Sysprof marks. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1527
* clutter/actor: Make functions to queue relayout/redraw on clones staticJonas Dreßler2020-10-262-32/+30
| | | | | | | | We don't call those functions from outside ClutterActor and we also shouldn't, so remove them from the private header and define them statically. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1527