Add two fields to struct server:
struct view *pending_auto_raise_view;
struct wl_event_source *pending_auto_raise_timer;
and forward-declare desktop_cancel_pending_auto_raise() in labwc.h.
The state is a single 'slot' (at most one view/timer pending) since
a new focus change supersedes any previous pending raise.
This commit just reserves the state and the public API; the
behaviour is implemented in the following commit.
Add a new <focus><raiseOnFocusDelay> element accepting an integer in
milliseconds. The default of 0 preserves the current behavior (raise
immediately when raiseOnFocus is enabled).
The new field is carried as uint32_t raise_on_focus_delay_ms on
struct rcxml. This commit only adds the parser and default; the
actual delay logic follows in a subsequent commit.
Let distributors opt out of installing labwc-session.target at configure
time. Default is 'auto' (install if the systemd pkg-config file is
present), 'enabled' forces it on, 'disabled' skips it entirely.
Describe the shipped labwc-session.target in labwc(1) SESSION MANAGEMENT
and add commented-out systemctl start/stop lines to the example
autostart and shutdown files. Users on systemd-based distros can
uncomment these to pull in graphical-session.target when labwc starts
and tear it down cleanly on exit, without labwc itself mandating any
specific init system.
Add a small systemd user target modelled on miracle-wm-session.target.
It binds to graphical-session.target and orders after
graphical-session-pre.target, so systemd user services declaring
WantedBy=graphical-session.target (panels, portals, notification
daemons, ...) start and stop in sync with a labwc session.
Installed into $systemduserunitdir when the systemd dependency is
available at configure time; on systems without systemd the install
is skipped and labwc's runtime activation of the target fails
gracefully.
Modifier+right-drag resize was silently ignored on fully maximized views
because of an early-return guard in interactive_begin(). The axis-specific
un-maximization logic introduced in #3043 already handles partial
maximization correctly; extend that to the VIEW_AXIS_BOTH case so both
axes are cleared while keeping the current geometry as the starting point
of the resize.
Move already permits dragging maximized views, so this also removes an
asymmetry between the move and resize paths.
Fixes: #3524
Use wlr_client_buffer->texture directly instead of wlr_texture_from_buffer.
All buffers in content_tree are wlr_client_buffer.
wlr_texture_from_buffer calls client_buffer_begin_data_ptr_access which
fails when client_buffer->source == NULL (client released buffer early,
e.g. wl_shm foot-terminal).
Add action `DebugToggleKeyStateIndicator` to show in the top-left corner
the pressed, bound, pressed-sent keys as well as modifiers.
This should help fault find issues like #2771 and #3238
Based-on: #3262
Co-authored-by: @tokyo4j
Android's bionic libc implements secure_getenv() as a function that
always returns NULL because app processes don't have AT_SECURE set.
This prevents xkbcommon from reading XKB_DEFAULT_LAYOUT and other
environment variables when resolving keyboard layouts.
Use XKB_CONTEXT_NO_SECURE_GETENV on Android so xkbcommon falls back
to regular getenv(), which works correctly in the Android app
environment.
Add a 'labnag' meson option (default: auto) to allow disabling the
labnag notification daemon at build time. This is useful for
embedded/headless deployments (e.g. Android) where labnag is not
needed, and avoids building its wayland-client dependencies.
Disable with: meson setup build -Dlabnag=disabled
It was used to get window icon via _NET_WM_ICON, which is now
implemented by wlroots 0.20. Anyone who needs another atom can revert
this commit and add atoms in the `atoms` array.
Ref: 515275ee7214bf91f8a758b660093eb4b932195a
(wlr_scene: Introduce wlr_scene_set_gamma_control_manager_v1)
This wlroots change eliminates the need for separate event tracking for gamma
control application.
v2: Fix code style
v3: Rebase now that 0.20 is merged
Ref: 84d603acc06a45dd3c3a4b2cf1fd08b2933ca2b5
(xwayland: take wlr_buffer in wlr_xwayland_set_cursor())
Ref: 6ae54dca23064e897b393283887986e5719a747f
(xwayland: lock new buffer instead of the old one)
Co-Authored-By: Consolatis
This wlroots change fixes a potential UAF which we dealt with in labwc.
We can thus remove the workaround completely.
Ref: 06275103f249cd2954630e59383342e102a6c1a3
(input-method-v2: Destroy keyboard grab before input method)
Background:
My MR in wlroots (!5107) stopped emitting `wlr_input_method_v2`
on its `commit`/`destroy` events, but didn't stop emitting
`wlr_input_method_keyboard_grab_v2` on its `destroy` event. That was
because `handle_keyboard_grab_destroy()` was called *after*
`handle_input_method_destroy()` for some reason, which caused segfault
when dereferencing `relay->input_method.keyboard_grab` in
`handle_keyboard_grab_destroy()`.
MR 5170 reversed this weired order of destroy handler calls, and finally
stopped emitting `wlr_input_method_keyboard_grab_v2` on its `destroy`
event.
Empirically, the associate event is always seen just after map_request
but before surface map. Window properties are also read by wlroots just
before emitting associate. So after some trial and error, this seems to
be the best place to set initial view states and compute initial
placement.
Fixes initial positioning of "urxvt -g -0-0".
urxvt placement regressed in:
9903331995
("xwayland: rework setting initial geometry from surface")
map_request handler was added ~2 years ago in:
c9018da4c4
("xwayland: set initial geometry in map_request handler")
I'm not sure if the map_request handler was incorrect from day one,
or if something changed in wlroots and/or Xwayland since then.