dbus-update-activation-environment and systemctl --user import-environment
were fired asynchronously via spawn_async_no_shell, racing with the autostart
script. Any systemd user service started from autostart (e.g. via
labwc-session.target) could start before the import completed, leaving
WAYLAND_DISPLAY and related variables absent from its environment and those
of any apps it launches.
Run both commands synchronously via a new spawn_sync_no_shell helper so
the import is guaranteed to complete before the autostart script executes.
Each scroll button draws its own full border, so placing the up and down
buttons flush produced a divider twice the intended thickness. Shift
button_down up by one border width and extend its height accordingly so
its top border overlaps button_up's bottom border.
Also drop a stray \`+ border\` offset from the scroll button text Y-position
that was pushing the label below the button's center.
Previously the scroll button group height was shorter than intended as it was
calculated using details.height instead of the border dimensions. Calculate
button heights using border_rect_height to properly fill the bordered region.
Use details-specific border thickness and color config options instead of regular button options. Adjust padding for a more compact look on details scroll buttons.
The raise_on_focus_delay is meant to dampen z-order churn from
focus-follows-mouse cursor passes. Applying it to every focus
change meant explicit actions (alt-tab cycle finish, Focus action,
xdg/xwayland activation, view map, etc.) also waited for the delay
before raising, which felt laggy.
Route all non-sloppy-focus callers through an immediate raise and
keep the timer-based raise only for desktop_focus_view_or_surface(),
which is the sloppy-focus entry point.
If the user disables raiseOnFocus or lowers raiseOnFocusDelay while
a raise is queued, the queued raise should not fire against the new
config. Cancel it in reload_config_and_theme() before rereading the
rc.xml.
The pending_auto_raise_view pointer would become dangling if the
view it references is destroyed before the timer fires. Clear it
in view_destroy() alongside the existing active_view cleanup.
When raiseOnFocus is enabled and raiseOnFocusDelay is > 0, defer
view_move_to_front() until a wl_event_loop timer elapses instead of
raising immediately. The pending view/timer pair lives on struct
server so that at most one raise can be pending per compositor.
Semantics:
delay_ms == 0 : immediate raise (preserves prior behavior)
delay_ms > 0, hover A : schedule raise of A after delay_ms
another hover before : timer is reset and the new view becomes
expiry the pending one (brief flyby hovers do
not stack up raises)
focus change, raise=false: pending raise is cancelled
This is most useful with followMouse to avoid brief passes of the
cursor stacking up z-order changes.
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.