summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* wayland: Fix wrong condition in xdg_exporter.exportCarlos Garnacho2018-03-121-4/+3
| | | | | | | | | | | Commit d714a94d9 added support for stable xdg-shell surfaces while preserving old unstable zxdg-shell v6 ones, but committed a mistake in checking for both in the xdg_exporter.export error condition paths. We want to check that the surface is neither of both. https://gitlab.gnome.org/GNOME/mutter/issues/63 Closes: #63
* Revert "window: Raise and lower tile match in tandem"Georges Basile Stavracas Neto2018-03-091-11/+1
| | | | | | | Raising and lowering windows in tandem without a proper grouping mechanism ended up being more annoying than functional. This reverts commit e76a0f564c1e07e32fe857d0f8e5b723c3bbe57d.
* renderer/native: Force EGL config pixel formatJonas Ådahl2018-03-053-5/+153
| | | | | | | | | We just arbitrarily chose the first EGL config matching the passed attributes, but we then assumed we always got GBM_FORMAT_XRGB8888. That was not a correct assumption. Instead, make sure we always pick the format we expect. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/2
* egl: Fail first config choosing when no resultsJonas Ådahl2018-03-051-0/+8
| | | | | | If there was no matching config, fail to find the first one. https://gitlab.gnome.org/GNOME/mutter/issues/2
* egl: Rename EGL simple config chooserJonas Ådahl2018-03-053-17/+17
| | | | | | It just picked the first config, so name it accordingly. https://gitlab.gnome.org/GNOME/mutter/issues/2
* theme: Fix icon scalingEgmont Koblinger2018-03-032-6/+6
| | | | | | | | | | | | | When painting the titlebar, button icons that aren't available in the desired size need to be scaled. However the current code inverses the scale factor, with the result that the adjusted icons are much worse than the original icons, whoops. This went unnoticed for a long time given that most icons are availa- ble in the desired 16x16 size, and the most likely exceptions - window icons - are not shown by default. https://gitlab.gnome.org/GNOME/mutter/issues/23
* backends/x11: Plug a leakCarlos Garnacho2018-02-271-0/+1
|
* remote-desktop, screen-cast: Add version number to D-Bus APIsJonas Ådahl2018-02-234-0/+28
| | | | | | In order to let applications gracefully handle version mismatches, add a version property to the APIs. Also add a warning on the APIs that these are not meant for public consumption.
* remote-desktop: Add support for discovering supported device typesJonas Ådahl2018-02-232-0/+45
| | | | | This is so that application will not try to send touch events when touch is not supported.
* remote-desktop: Add touch screen event supportJonas Ådahl2018-02-232-0/+168
|
* remote-desktop: Fix absolute pointer motion coordinatesJonas Ådahl2018-02-231-1/+23
| | | | | | If the coordinates was for a stream not at the stage position (0, 0), they'd be incorrect. Fix this by correctly translating the coordinates according to the stream position.
* screen-cast-stream: Add API to transform relative coordinatesJonas Ådahl2018-02-233-0/+44
| | | | Will be used to translate stream local coordinates to stage coordinates.
* screen-cast-session: Add API to get stream from object pathJonas Ådahl2018-02-232-0/+23
| | | | | Will be needed by the remote desktop session to translate stream local input coordinates.
* remote-desktop: Add relative pointer motion event supportJonas Ådahl2018-02-232-0/+37
| | | | Relative pointer motions are assumed to be pre-accelerated.
* remote-desktop: Add smooth scroll event supportJonas Ådahl2018-02-232-0/+55
|
* remote-desktop: Add keyboard keycode event supportJonas Ådahl2018-02-232-0/+43
| | | | | Keyboard keycode events will act as a physical keyboard thus depend on the active keyboard layout.
* remote-desktop: Support multiple axis steps at onceJonas Ådahl2018-02-231-7/+8
| | | | Just call the corresponding clutter API once for each step.
* remote-desktop: Fix notify axis input validity checkJonas Ådahl2018-02-231-1/+1
| | | | | The check was inverted; allowed axis are 0 and 1, not the other way around.
* wayland: Define abstract role types as actually abstractJonas Ådahl2018-02-233-9/+9
| | | | | | | They should not be instantiated by themself, only as actual roles. https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 https://bugzilla.gnome.org/show_bug.cgi?id=791938
* wayland: Add support for stable xdg-shellJonas Ådahl2018-02-239-176/+2393
| | | | | | | | | | | This commit adds support for xdg_shell (the stable version). This was done by first copying the old xdg-shell unstable v6 implementation into a separate .c .h file pair (including various symbol renaming) then porting the old xdg-shell unstable v6 implementation to the new stable version. https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 https://bugzilla.gnome.org/show_bug.cgi?id=791938
* wayland: Use helper to set shell surface windowJonas Ådahl2018-02-234-5/+25
| | | | | | | The helper deals with updating the surface output state. https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 https://bugzilla.gnome.org/show_bug.cgi?id=791938
* wayland: Push actor state instead of itself pullingJonas Ådahl2018-02-2313-309/+308
| | | | | | | | | | | | | | | | | Make the Wayland objects push the state relevant to their role to the MetaSurfaceActor instead of MetaSurfaceActorWayland pulling the state from the associated surface. This makes the relationship between the actor and the objects that constructs it more clear; the actor is a drawable that the protocol objects control, not the other way around. This will make it easier to "detach" a surface actor from a surface, which is necessary when unmapping a window while the underlying surface is yet to be destroyed and potentially reused. https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 https://bugzilla.gnome.org/show_bug.cgi?id=791938
* surface-actor/wayland: Minor style fixesJonas Ådahl2018-02-231-5/+9
| | | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 https://bugzilla.gnome.org/show_bug.cgi?id=791938
* xwayland: Base Xwayland surface role object on the actor roleJonas Ådahl2018-02-231-3/+12
| | | | | | | | | The Xwayland role uses a MetaSurfaceActorWayland just so lets share logic related to it. As a side effect, wl_surface.enter/leave starts working for Xwayland surfaces. https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 https://bugzilla.gnome.org/show_bug.cgi?id=791938
* wayland: Restructure surface role building blocks codeJonas Ådahl2018-02-2312-648/+834
| | | | | | | | | | | | | | | | | | | | | This commit moves out non-core wl_surface related code into separate code units, while renaming types to fit a common scheme. The changes done are: * ClutterActor based surface roles built upon MetaWalyandSurfaceRoleActorSurface. This object has been renamed to MetaWaylandActorSurface and related functionality has moved into meta-wayland-actor-surface.c. * The code related to roles backed by a MetaWindow (i.e. built upon MetaWaylandShellSurface) was moved into meta-wayland-shell-surface.c * The majority of subsurface related code was moved into into meta-wayland-subsurface.c and the object was renamed MetaWaylandSubsurface. https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 https://bugzilla.gnome.org/show_bug.cgi?id=791938
* wayland/surface: Stop using deprecated g_object_newvJonas Ådahl2018-02-231-38/+38
| | | | | | | | Replace it with g_object_new_with_properties. This fixes a warning about using deprecated API. https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 https://bugzilla.gnome.org/show_bug.cgi?id=791938
* wayland/xdg-shell: Minor cosmetic cleanupsJonas Ådahl2018-02-231-6/+8
| | | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 https://bugzilla.gnome.org/show_bug.cgi?id=791938
* wayland/xdg-shell: Standardize xdg_positioner Wayland vfunc namingJonas Ådahl2018-02-231-32/+32
| | | | | | | | Use the convention [interface]_[request] (..) used elsewhere in the file. https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 https://bugzilla.gnome.org/show_bug.cgi?id=791938
* wayland/xdg-shell: Standardize object class interface vfunc namesJonas Ådahl2018-02-231-52/+53
| | | | | | | | Follow the convention that MetaSomeObject's class vfuncs should be named meta_some_object_said_vfunc. https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 https://bugzilla.gnome.org/show_bug.cgi?id=791938
* wayland: Shorten MetaWaylandSurfaceRoleShellSurface nameJonas Ådahl2018-02-236-145/+140
| | | | | | | It was annoyingly long, so rename it to MetaWaylandShellSurface. https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 https://bugzilla.gnome.org/show_bug.cgi?id=791938
* src/Makefile.am: Remove redundant generation rulesRobert Mader2018-02-231-11/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=792203
* x11: Do not discard shape region for undecorated windowsOlivier Fourdan2018-02-221-3/+3
| | | | | | | | | | | | | | | | | mutter would discard the shape region set by the client if its matches the entire client area in meta_window_x11_update_shape_region(). However, if the window is later resized (maximized or other), the compositor will fail to update the shape region properly for undecorated windows because the shape region was discarded, which causes black areas to appear in place of the updated areas. If the client window is undecorated, keep the shape region even if when it matches the client area. https://gitlab.gnome.org/GNOME/mutter/issues/27 Closes: #27
* renderer/native: Don't use modifiers to import linear DMA bufferLouis-Francis Ratté-Boulianne2018-02-221-1/+2
| | | | | | | | | | | | | When the buffer modifier is DRM_FORMAT_MOD_LINEAR, we can use the old code path. That means not specifying any modifier parameter. It was an issue when the primary GPU was creating a linear GBM surface and that a secondary GPU (not supporting modifiers) was trying to import it. It was failing because the driver could not use the import_modifiers extension even though it could in theory easily import the buffer. https://gitlab.gnome.org/GNOME/mutter/issues/18
* native/renderer: Retrieve the right modifiers set for each GPULouis-Francis Ratté-Boulianne2018-02-221-140/+241
| | | | | | | | | | | | | | | | | We were retrieving the supported KMS modifiers for all GPUs even though what we really need to intersect between these sets of modifiers: 1) KMS supported modifiers for primary GPU if the GPU is used for scanout; 2) EGL supported modifiers for secondary GPUs (different than the primary GPU used for rendering); 3) GBM supported modifiers when creating the surface (already taken care of by gbm_surface_create_with_modifiers()); https://gitlab.gnome.org/GNOME/mutter/issues/18
* renderer/native: Use the right EGL image parameters for extra planesLouis-Francis Ratté-Boulianne2018-02-221-7/+7
| | | | | | There was a typo for modifier parameter of planes 1 & 2. https://gitlab.gnome.org/GNOME/mutter/issues/18
* backends: Monitor changes in active tools' settingsCarlos Garnacho2018-02-191-3/+68
| | | | | | | | | | So the changes can be instantly applied while the tool is in proximity. Before we would just do it on proximity-in, which doesn't provide a good look&feel while modifying the tool settings in g-c-c. https://gitlab.gnome.org/GNOME/mutter/issues/38 Closes: #38
* build: Fix distcheckCarlos Garnacho2018-02-181-0/+1
| | | | | | | | Missing protocol XML in wayland_protocols/EXTRA_DIST. https://gitlab.gnome.org/GNOME/mutter/issues/35 Closes: #35
* wayland: Avoid clutter_input_focus method calls when unfocusedwip/carlosg/text-input-fixesCarlos Garnacho2018-02-121-0/+2
| | | | | | | | If text_input_enable() is called when there no active IM (eg. running plain mutter), some ClutterInputFocus method calls that are not allowed while unfocused will end up called, triggering critical warnings. If there is no IM return early here, all other calls are superfluous then.
* Change naming of GParmSpec enum id string for naming consistencyGwan-gyeong Mun2018-02-103-9/+9
| | | | | | | | | GParamSpec enum string usually follows "PROP_" prefix and PROP_LAST is used for last PROP string. https://gitlab.gnome.org/GNOME/mutter/issues/28 Closes: #28
* wayland: Handle NULL event node/vendor/product on tablet methodsCarlos Garnacho2018-02-092-4/+15
| | | | | | We currently don't handle NULLs on these correctly, yet they can be so when running nested. Just refrain from sending those wp_tablet(_pad) events in that case.
* backends/x11: wacom pressure curve is a 32-bit propertyPeter Hutterer2018-02-091-2/+2
| | | | | | | | | | The property has been 32 bits since around 2011 and has not changed, mutter expects it to be 8 bits. The mismatch causes change_property to never actually change the property. https://gitlab.gnome.org/GNOME/mutter/issues/26 Closes: #26
* wayland: Fix handling of INCR transactionsCarlos Garnacho2018-02-071-2/+2
| | | | | | | | | | The window checks in the XPropertyEvent handler were wrong both ways, so transfers would be left stale after the first chunk was dealt with. https://gitlab.gnome.org/GNOME/mutter/issues/1 Closes: #1
* wayland: Use read_all() when reading wayland selectionsCarlos Garnacho2018-02-071-7/+6
| | | | | | | | | | | Plain input stream read() calls don't provide hard guarantees about the number of bytes read, but the async method callback sort of relies on bytes being less than requested only when reaching the end of the transmitted data. If that happens mid transfer, that doesn't bode well. This is actually the behavior of g_input_stream_read_all(), so switch to using it.
* renderer/x11: Enable GPU memory purge error extension if availableJonas Ådahl2018-02-072-2/+1
| | | | | | | | This was done by the clutter X11 backend before prior to introducing MetaRenderer, but during that work, enabling of said extension was lost. Let's turn it on again. https://bugzilla.gnome.org/show_bug.cgi?id=739178
* main: Add --x11 command line argumentJonas Ådahl2018-02-061-2/+14
| | | | | | | | This is in order to force running as a X11 window manager/compositing manager. Useful for debugging and other cases where the automatic detection does not work as expected. https://gitlab.gnome.org/GNOME/mutter/merge_requests/15
* wayland: Do not fail on stalled .X11-unix entriesOlivier Fourdan2018-02-051-1/+2
| | | | | | | | | | | | | | If for whatever reason, there are stalled files in /tmp/.X11-unix/ the bind() to the abstract socket will succeed but not the bind() to the to the UNIX socket. This causes gnome-shell/mutter to fail because it cannot start Xwayland (while it could actually, by using a different display). In case of failure to bind to the UNIX socket, try the next display instead of failing, to avoid stalled entries in /tmp/.X11-unix. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/13
* wayland: send shortcut inhibit “active” eventOlivier Fourdan2018-02-051-9/+3
| | | | | | | | | | | | | | The shortcut inhibitor protocol states that the “active” event should be sent every time compositor shortcuts are inhibited on behalf of the surface. However, mutter would send that event only if the surface is focused, which might not be the case if focus is on a shell surface. Send the “active” event unconditionally to match the protocol definition. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/10
* gpu-kms: Don't add outputs without modesJonas Ådahl2018-02-053-24/+50
| | | | | | | | | | | | | | | | | | | There seems to be a kernel race when one disconnects an external monitor connected to a DisplayPort via a USB-C adapter. The race results in a connector being reported as connected, but without any modes supported. This had the side effect that we tried to set a preferred mode to the first listed mode, but as no modes were available, we instead tried to dereference the first element of a NULL array, causing a segmentation fault. Mitigate this by skipping adding output if no supported modes are advertised and the output doesn't support scaling, while moving the fallback path for calculating a preferred output mode to after possibly adding the common modes, to avoid the unvolentary NULL dereference. https://bugzilla.gnome.org/show_bug.cgi?id=789501
* backends/x11: Preserve XI1 XDevice throughout ClutterInputDevice lifetimeCarlos Garnacho2018-02-011-6/+42
| | | | | | | | | | | | | | | | | | Opening and closing the device may result into XI2 grabs being cut short, resulting into pad buttons being rendered ineffective, and other possible misbehaviors. This is an XInput flaw that fell in the gap between XI1 and XI2, and has no easy fix. It pays us for mixing both versions, I guess... Work this around by keeping the XI1 XDevice attached to the ClutterInputDevice, this way it will live long enough that this is not a concern. Investigation of this bug was mostly carried by Peter Hutterer, I'm just the executing hand. https://gitlab.gnome.org/GNOME/mutter/issues/7 Closes: #7
* backends/x11: Fix time-comparison bug causing hangJeff Smith2018-02-011-1/+1
| | | | | | | | | | | A comparison in translate_device_event() does not account for the fact that X's clock wraps about every 49.7 days. When triggered, this causes an unresponsive GUI. Replace simple less-than comparison with XSERVER_TIME_IS_BEFORE macro, which accounts for the wrapping of X's clock. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/12