Chromium (and slurp) expect wl_keyboard.keymap event to be sent before
wl_keyboard.modifiers event. Normally, wl_keyboard.keymap event is sent
on the client first obtains wl_keyboard with wl_seat.get_keyboard
request.
However, after the active (especially virtual) keyboard is destroyed,
wlroots doesn't respond to wl_seat.get_keyboard request with
wl_keyboard.keymap event since there's no active keyboard on the seat.
Therefore, if we run commands like "sleep 2; wtype hello; chromium", the
active keyboard is destroyed when wtype finishes and
wl_keyboard.modifiers event is sent to Chromium when Chromium first maps
the surface and the keyboard focus is moved to it, then Chromium crashes.
With slurp, fcitx5 and multi-monitor setup, a similar thing happens.
When slurp first creates the layer-shell surfaces, the focus moves to it
(without wl_keyboard.enter though), and fcitx5 is transiently deactivated
and it destroys the virtual keyboard. Then when slurp maps those
surfaces, the focus moves between them again and wl_keyboard.modifiers
event is sent, thus slurp crashes.
So with this commit, when the active keyboard on the seat is destroyed,
the keyboard from the keyboard group is set to the seat instead so
wlroots can respond to wl_seat.get_keyboard request with
wl_keyboard.keymap.
This gives instant feedback when changing cursor theme or size.
It only works for server side cursors or clients using the
cursor-shape protocol.
Fixes: #1619
There were some missing headers like <stddef.h> for `NULL`, <wayland-util.h>
for `wl_link` and <stdbool.h> for `true`/`false`.
Also this commit fixes that `labwc.h` and `ime.h` included each other.
...if keymap cannot be created for the provided XKB_DEFAULT_LAYOUT.
If keymap still cannot be created, exit with a helpful message to avoid
crash that is hard to understand.
Fixes: https://github.com/stefonarch/lxqt-labwc-session/issues/7
Now we now longer gray-out the active window when opening a focusable
popup menu (e.g. the applications menu from an XWayland panel). This
matches Openbox behavior.
Exclude none (zero) from the bitmask test , otherwise
the bitmask test is always true when click method is
configured to 'none' and as a result the configuration
will be skipped.
If keyboard-layout-per-toplevel-window is used, reset the group (index)
for each window on --reconfigure whenever the keymap has changed.
Refactor to use a common configure function for reconfigure and
keyboard-group creation.
Co-authored-by: @johanmalm
Fixes#1407
It is nice to have finer granularity for device types to allow for
configurations such as using `naturalScroll` on touchpads, but not on
regular pointer devices such as mice.
...because layer-shell clients are not views and we want to be able to
use foreign-toplevel protocol on the active view even if a client such as
a panel has taken keyboard focus.
Written-by: @Consolatis
Fixes: #1336
We were checking for a locked session in desktop_focus_view(), but there
are several other call sites of seat_focus_surface() which were missing
such a check. Any one of those could cause the lock screen to lose focus
(making the session impossible to unlock) or another surface to gain it
(breaching the session lock).
To fix the issue, make any call to seat_focus_surface() no-op when the
session is locked. Add a specific seat_focus_lock_surface() function
which is the only way to bypass the check and is called only from
session-lock.c.
If an xwayland-unmanaged surface was focused belonging to the same
application as the focused view, allow the view to remain active. This
fixes an issue with menus immediately closing in some X11 apps (try
LibreOffice with SAL_USE_VCLPLUGIN=gen).
Fixes: 4028a9482f
("seat: use focus_change event to update focused/active view")