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.
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/26Closes: #26
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/1Closes: #1
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.
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
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
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
On drivers that do not support glGetTexImage2D (i.e. on GLES),
cogl_texture_get_data() has a "feature" that allows it to download
texture data by rendering the texture on an intermediate framebuffer
object and then reading back the data from there. However, this
feature requires the user to have previously set an "active"
framebuffer object in the context, which makes this very tricky
because it is not clear to the developer that he needs to do that
in order for some code to work on GLES (of course it works on
desktop GL, so nobody notices...) and additionally the code actually
crashes if an active fbo is not set!
This patch basically removes this feature in order to prevent
the crash and is in line with how this code has evolved in cogl-2.0:
https://git.gnome.org/browse/cogl/commit/?id=6d6a277b8e9a63a8268046e5258877ba94a1da5bhttps://bugzilla.gnome.org/show_bug.cgi?id=789961
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
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
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/7Closes: #7
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
The tertiary-button-action (see bug 790028) is a place for g-c-c to store
the action which should be performed when a stylus' third button is pressed.
Pressing this button is signaled as a BTN_STYLUS3 event from the kernel or
X11 button 8.
https://bugzilla.gnome.org/show_bug.cgi?id=790033
BTN_STYLUS3 is defined by the Linux 4.15 kernel and is sent when the
third button on a stylus is pressed. At the moment, only Wacom's "Pro
Pen 3D" has three stylus buttons. Pressing this button triggers a button
8 event to be sent under X11, so we use the same mapping here.
https://bugzilla.gnome.org/show_bug.cgi?id=790033
When a window's workspace is not NULL, on_all_workspace should be FALSE.
Similarly, when on_all_workspace is TRUE, the window workspace should be
NULL.
This is an assumption in multiple places in the code, including when
setting the workspace state, the window is either added or removed from
all workspaces only if the window's workspace is NULL.
This rule is initially enforced at creation in _meta_window_shared_new()
when a initial workspace is set. However, when the initial workspace is
set from the session info, the initial workspace is not marked as “set”
which leads to an assertion failure when unmanaging windows, because the
window is not removed from all the workspaces.
When applying the session info to a window, mark the workspace as “set”.
https://gitlab.gnome.org/GNOME/mutter/issues/4Closes: #4
Having “on_all_workspaces_requested” FALSE on a window does not imply a
workspace is set.
If the X11 window is placed on a secondary monitor while workspaces
applies on primary monitor only (“workspaces-only-on-primary” set) then
“on_all_workspaces_requested” is FALSE while “on_all_workspaces“ is TRUE
and the associated workspace is NULL, leading to a crash when saving the
gnome-shell/mutter session.
So if no workspace is set, use the “initial_workspace” instead to avoid
a NULL pointer dereference.
https://bugzilla.gnome.org/show_bug.cgi?id=792818
clutter_set_viewport always operates on the draw fb, but
mutter sometimes has an offscreen fb it uses instead.
This commit uses the non-deprecated, clutter_framebuffer_set_viewport
function, which takes an explicit fb argument.
Closes: https://gitlab.gnome.org/GNOME/mutter/merge_requests/2
GTK+ doesn't support shading of client-side decorated windows, and likely
never will (not least because shading is conceptually questionable if the
app customizes the titlebar), and neither do other CSD implementations like
Chromium's. A shortcut that only works with a decreasing number of windows
is more confusing than helpful, so don't expose it.
https://bugzilla.gnome.org/show_bug.cgi?id=645460
Given that GNOME has used a vertical workspace layout ever since 3.0,
allowing users to assign keyboard shortcuts for horizontal workspace
navigation isn't useful at all, as rightfully pointed out by Bastien
Nocera.
https://bugzilla.gnome.org/show_bug.cgi?id=645460
Now that we have the list of supported modifiers from the monitor
manager (via the CRTCs to the primary planes), we can use this to inform
EGL it can use those modifiers to allocate the GBM surface with. Doing
so allows us to use tiling and compression for our scanout surfaces.
This requires the Mesa commit in:
Mesa 10.3 (08264e5dad4df448e7718e782ad9077902089a07) or
Mesa 10.2.7 (55d28925e6109a4afd61f109e845a8a51bd17652).
Otherwise Mesa closes the fd behind our back and re-importing will fail.
See FDO bug #76188 for details.
https://bugzilla.gnome.org/show_bug.cgi?id=785779
Newer versions of GBM support buffer modifiers, including multi-plane
buffers. Use this new API to explicitly pull the information from GBM,
and feed it to drmModeAddFB2WithModifiers.
https://bugzilla.gnome.org/show_bug.cgi?id=785779
The KMS IN_FORMATS blob property contains a structure defining which
format/modifier combinations are supported for each plane. Use this to
extract a list of acceptable modifiers to use for the primary plane for
XRGB8888, so we can ask EGL to allocate tiled/compressed buffers for
scanout when available.
https://bugzilla.gnome.org/show_bug.cgi?id=785779
Using 800x600 as minimum logical size is very 4:3 thinking, while a lot of
modern devices are 16:9. The specific reason for this commit is to allow
1.5 scaling at mini-laptops (clamshell devices) with e.g. a 5.5"
1280x720 screen. Given that this device has a keyboard, one obviously
is not holding it very close to ones eyes and at 220 dpi that means the text
is too small at scale 1.0. For one real world example of such a device see:
https://en.wikipedia.org/wiki/GPD_Winhttps://bugzilla.gnome.org/show_bug.cgi?id=792765
This function returns TRUE if there is any preedit going on. This method
will be useful in gnome-shell where similar checks are performed on
StIMText actors.
Offer the text-input interface global, so it can be used by clients. The
MetaWaylandSeat will also let MetaWaylandTextInput intercept key events
before the keyboard interface handles those.
This is the implementation of the internal text-input protocol that will
be used to communicate IMs (to be implemented by gnome-shell) with clients.
The text_input protocol has its own focus expressed through enter/leave
events, that will typically follow the keyboard's.
The client will be able to communicate its current status (eg. focus state,
cursor rectangle in surface coordinates, text surrounding the cursor
position, ...) and will receive commands from the compositor (eg. preedit
text, committing a string, ...).
Whenever there is an active input method, the compositor will route key
events directly through it. The client will not receive wl_keyboard
events if the event is consumed by the IM.
ClutterInputFocus is an abstract object to be subclassed by UI actors and
the wayland interface and represents the user of an input method. It
represents the current focus of the input method, so all emitted signals
and public API hooks are expected to be called when the input method is
currently interfacing with the input focus.
ClutterInputMethod is an abstract class (to be implemented in the upper
layers) that represents the input method itself. Besides focus management
itself, all public API calls that would be called by the subclasses are
delivered through the current input focus.