Lets use the role when doing role specific commit actions. The
conditions effectively do that anyway, and this way we will get a
compiler warning here whenever we add a new role, as well as we avoid
having different variants of role-determination checks in different
places.
https://bugzilla.gnome.org/show_bug.cgi?id=744453
Enable a user to test and debug multi output configurations on Wayland
without having the available hardware by enabling some basic
configuration of the dummy monitor manager.
Currently available configuration options are:
MUTTER_DEBUG_NUM_DUMMY_MONITORS - to set the number of monitors
MUTTER_DEBUG_DUMMY_MONITOR_SCALES - to configure the monitor scales
See src/backends/meta-monitor-manager-dummy.c for detailed description
of the available configuration parameters.
https://bugzilla.gnome.org/show_bug.cgi?id=747089
Before submitting a new scroll mode, click method or sendevents mode check if
the value is supported by the device. This avoids BadValue errors when setting
two-finger scrolling on single-finger touchpad devices since we can't easily
handle BadValue (see 9747277b)
https://bugzilla.gnome.org/show_bug.cgi?id=750816
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The gtk-doc reference is woefully maintained, and trying to actually
generate it resulted in some extremely outdated and poor documentation.
If somebody wants to actually renew the docs, just revert this commit,
otherwise, I'm not going to bother.
The elementary guys would like this as an API, and I don't see any
reason to refuse -- this is quite nice shadow painting code :)
For some reason, gobject-introspection can't seem to cope with
MetaWindowShape. I'll look into it a bit later, but for now, mark
the function it has trouble with as (skip).
It seems that when translated, paint_offset and actor_offset will always
be the same, so our translation of the clip group won't work. For now,
until I figure out what's going on here, just use the painting offset,
since that what seems to make sense to me.
I didn't write this code, though, so I don't know why the actor's
allocation was involved in this computation at all.
I tested briefly with clones (magnifier, manual cloning through the
looking glass) and couldn't find any other artifacts, so I'm going to do
this for now.
A much less hacky version of maximize / unmaximize is reimplemented
in terms of this, but it could also eventually be used for fullscreen /
unfullscreen, and tile / untile.
The comment explains it better, but Clutter tries to be smart and
repaint actors when their allocations change. Since the window group's
allocation changes when windows move around, this means that moving a
window will always cause a full-stage repaint, which is super slow.
Hack around this for now.
While nothing will completely fix X11's artifacts, this tends to look a
bit better, *especially* with mask textures that have black at the
edges (which are most of them).
It's also faster for GPUs to manage.
The only time we ever execute this code is when we're minimizing or
hiding a window, in which case we should respect stacking order.
This fixes weird "bugs" where windows from the same app magically pop up
over other windows.
We should not be setting random output properties like this.
Use the function we just introduced to only set the underscan flag when
it's actually supported.
So that clients such as the control center can decide to hide an
underscanning checkbutton when the output does not support it.
Support in the KMS / native backend to come later...
This is an extremely niche feature, and conflicts with the rest of our
interface being consistent about not allowing resizing while tiled or
maximized.
A window may be hidden even if not minimized itself, for instance
when an ancestor is minimized. As meta_window_focus() will refuse
to actually focus the window in that case, don't pick it in the first
place.
https://bugzilla.gnome.org/show_bug.cgi?id=751715
Firstly, this patch makes MetawaylandDataSource a GObject. This is in
order to easier track its lifetime without adding destroy signals etc. It
also makes the vfunc table GObject class functions instead while at it,
as well as moves protocol specific part of the source into their own
implementations.
An important part of this patch is the change of ownership. Prior to this
patch, MetaWaylandDataDevice would kind of own the source, but for
Wayland sources it would remove it if the corresponding wl_resource was
destroyed. For XWayland clients it would own it completely, and only
remove it if the source was replaced.
This patch changes so that the protocol implementation owns the source.
For Wayland sources, the wl_resource owns the source, and the
MetaWaylandDataDevice sets a weak reference (so in other words, no
semantical changes really). For XWayland sources, the source is owned by
the selection bridge, and not removed until replaced or if the client
goes away.
Given the changes in ownership, data offers may now properly track the
lifetime of a source it represents. Prior to this patch, if an offer with
an XWayland source would loose its source, it wouldn't get notified and
have an invalid pointer it would potentally crash on. For Wayland
sources, an offer would have a weak reference and clean itself up if the
source went away. This patch changes so the behavior is consistent,
meaning a weak reference is added to the source GObject so that the offer
can behave correctly both for Wayland sources and XWayland sources.
https://bugzilla.gnome.org/show_bug.cgi?id=750680
When a possible drag dest client crashes during DnD, it may happen
we receive first the destroy notification for the data_device, and
later the notification for the focus surface. When this happens we
unset the drag_focus_data_device first, and later on
meta_wayland_drag_grab_set_focus(grab, NULL) we assume it still
exists when sending the leave event, leading to mutter crashing
right after.
So, as we don't receive any ordering guarantees about resource
destruction, just prepare the meta_wayland_drag_grab_set_focus()
paths for this.
It seems that fglrx sometimes gives us absolute junk when requesting the
outputs, and if we don't trap errors, we'll just crash when trying to
configure a junk output. Use xcb so errors simply get ignored.
For enter / leave events, which we use in the UI code, we need to make
sure that these coordinates are root-relative as well, otherwise the
cursor when entering frames might be incorrect.
Going from fullscreen to unfullscreen involves a frame border size, so
in order to properly interpret the saved rect size, we need to make sure
that the frame borders are fully up to date.
When we're unredirected, we don't have a pixmap, and thus our allocation
becomes 0x0. So when events come in, they pass right through our actor,
going to the one underneath in the stack.
Fix this by having a fallback size on the shaped texture actor when
we're unredirected, causing it to always have a valid allocation.
This fixes clicking on stuff in sloppy / mouse mode focus.
In commit cc5def1, buttons were changed from GdkRectangles to
MetaButtonSpace units, but the corresponding memset hack was not.
This means that the clickable portion of the unshade rectangle
was always set to uninitalized memory. The effects of this were
random, but in cases where the moon is aligned just right, the
rectangle would graze over the borders, and so it would take priority
over other borders and show a pointer cursor instead of a resize
cursor.