]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
20 months agoRemove fuzzy for capitalized translations
stefonarch [Tue, 25 Jun 2024 11:01:45 +0000 (13:01 +0200)]
Remove fuzzy for capitalized translations

20 months agodnd: show dnd icon above layer-shell surfaces
tokyo4j [Tue, 25 Jun 2024 12:20:12 +0000 (21:20 +0900)]
dnd: show dnd icon above layer-shell surfaces

20 months agoTranslation updates from weblate
Weblate [Mon, 24 Jun 2024 19:19:25 +0000 (21:19 +0200)]
Translation updates from weblate

Co-authored-by: Abdullah Albaroty <albaroty@gmail.com>
Co-authored-by: Jan Rolski <wbcwknvstb@proton.me>
Co-authored-by: Priit Jõerüüt <lxqtwlate@joeruut.com>
Co-authored-by: Standreas <standreas@riseup.net>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ar/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/de/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/et/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/it/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/pl/
Translation: Labwc/labwc

20 months agoTranslation updates from weblate
Weblate [Sun, 23 Jun 2024 12:19:01 +0000 (14:19 +0200)]
Translation updates from weblate

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/
Translation: Labwc/labwc

20 months agoUpdated labwc.pot file
stefonarch [Sun, 23 Jun 2024 10:56:59 +0000 (12:56 +0200)]
Updated labwc.pot file

20 months agosrc/main.c: initialize locale after reading environments file
tokyo4j [Sat, 22 Jun 2024 21:51:22 +0000 (06:51 +0900)]
src/main.c: initialize locale after reading environments file

This makes the locale for client-menu items and workspace names follow
the env var `LANG` defined in `~/.config/environments`.

20 months agopo/meson.build: minor formatting
tokyo4j [Sat, 22 Jun 2024 21:46:16 +0000 (06:46 +0900)]
po/meson.build: minor formatting

20 months agoinput: test if tablet device is a libinput device
Jens Peters [Sun, 16 Jun 2024 07:10:46 +0000 (09:10 +0200)]
input: test if tablet device is a libinput device

Otherwise we might end with a failed assertion if the
tablet or pad isn't a libinput device.

Fixes https://github.com/labwc/labwc/issues/1916

20 months agoaction: add ToggleTabletMouseEmulation
Jens Peters [Sun, 16 Jun 2024 06:47:48 +0000 (08:47 +0200)]
action: add ToggleTabletMouseEmulation

Useful for switching between application-defined and
mapped tablet  pad buttons. Also for quickly troubleshooting
tablet behavior.

20 months agomenu: capitalize Roll Up/Down
Johan Malm [Fri, 14 Jun 2024 21:17:03 +0000 (22:17 +0100)]
menu: capitalize Roll Up/Down

...because it seems like better English and is more consistent with other
menu entries.

Same for 'Move Left' and 'Move Right'

20 months agoTypo
Simon Long [Fri, 14 Jun 2024 09:24:49 +0000 (10:24 +0100)]
Typo

20 months agoUse existing reset_keybind function
Simon Long [Fri, 14 Jun 2024 09:23:04 +0000 (10:23 +0100)]
Use existing reset_keybind function

20 months agoMove extern to h file
Simon Long [Thu, 13 Jun 2024 10:04:30 +0000 (11:04 +0100)]
Move extern to h file

20 months agoFix release keybindings being triggered after mouse bindings
Simon Long [Thu, 13 Jun 2024 09:57:34 +0000 (10:57 +0100)]
Fix release keybindings being triggered after mouse bindings

20 months agoImplement <resize><drawContents>
tokyo4j [Wed, 29 May 2024 02:06:39 +0000 (11:06 +0900)]
Implement <resize><drawContents>

<resize><drawContents>[yes|no] configures whether to let the clients
redraw its window content content while resizing.

When <resize><drawContents> is set to no, a multi-rect is shown to
indicate the geometry of the resized window.

20 months agosrc/theme.c: add zero_array() macro
tokyo4j [Mon, 20 May 2024 06:19:37 +0000 (15:19 +0900)]
src/theme.c: add zero_array() macro

20 months agomenu: ignore <item> without parent <menu>
Johan Malm [Thu, 13 Jun 2024 20:00:44 +0000 (21:00 +0100)]
menu: ignore <item> without parent <menu>

...to avoid assert() in item_create() because current_menu is NULL.

Reproduce crash with...

    <?xml version="1.0" encoding="utf-8"?>
    <openbox_menu>
      <item label="foo"/>
    </openbox_menu>

20 months agodocs: clarify tablet button mapping
Jens Peters [Mon, 10 Jun 2024 17:45:45 +0000 (19:45 +0200)]
docs: clarify tablet button mapping

20 months agoinput: support tablet-v2 pad notifications
Jens Peters [Tue, 4 Jun 2024 18:21:12 +0000 (20:21 +0200)]
input: support tablet-v2 pad notifications

20 months agoinput: track tablets and tablet-pads at seat
Jens Peters [Tue, 4 Jun 2024 18:14:30 +0000 (20:14 +0200)]
input: track tablets and tablet-pads at seat

20 months agoinput: run mousebind action only on button pressed
Jens Peters [Tue, 11 Jun 2024 04:41:24 +0000 (06:41 +0200)]
input: run mousebind action only on button pressed

20 months agoTranslation updates from weblate
Weblate [Fri, 7 Jun 2024 05:11:14 +0000 (07:11 +0200)]
Translation updates from weblate

Co-authored-by: The Silitonix <silitonix@gmail.com>
20 months agokeyboard: handle onRelease keybind after long press
Johan Malm [Mon, 10 Jun 2024 21:34:53 +0000 (22:34 +0100)]
keyboard: handle onRelease keybind after long press

...that is longer than the specified repeatDelay interval.

20 months agoxwayland: reset cursor image on cursor theme reload
Consolatis [Sun, 9 Jun 2024 22:01:54 +0000 (00:01 +0200)]
xwayland: reset cursor image on cursor theme reload

As wlr_xwayland caches the pixel data when not yet started
up due to the delayed lazy startup approach, we do have to
re-set the xwayland cursor image when reloading the cursor
theme. Otherwise the first X11 client connected will cause
the xwayland server to use the cached (and destroyed) pixel
data.

To reproduce:
- Compile with b_sanitize=address,undefined
- Start labwc (nothing in autostart that could create
  a X11 connection, e.g. no GTK or X11 application)
- Reconfigure
- Start some X11 client

20 months agoNEWS.md: interim update
Johan Malm [Sun, 9 Jun 2024 20:56:27 +0000 (21:56 +0100)]
NEWS.md: interim update

20 months agosrc/button/button-svg: reduce debug log spam
Consolatis [Sun, 9 Jun 2024 22:05:43 +0000 (00:05 +0200)]
src/button/button-svg: reduce debug log spam

20 months agoAdd onRelease option to <keybind>
Simon Long [Fri, 26 Apr 2024 10:05:12 +0000 (11:05 +0100)]
Add onRelease option to <keybind>

...to make keybind actions fire on the release event rather then when the
key is first pressed. This is useful for binding actions to modifier keys
only. The most likely use-case for this is the binding of a Super key to a
menu, for example:

    <keybind key="Super_L" onRelease="yes">
      <action name="Execute" command="rofi -show drun"/>
    </keybind>

If another keybind is issued between the press and release, the on-release
keybind is cancelled.

Co-authored-by: @johanmalm
20 months agoinput: always notify all tablet axis
Jens Peters [Thu, 6 Jun 2024 15:41:05 +0000 (17:41 +0200)]
input: always notify all tablet axis

Notify all axis based on the capabilities of the
tablet tool. At least GTK applications expect
this for e.g. smooth pressure or distance events.

20 months agoinput: extract function
Jens Peters [Tue, 4 Jun 2024 18:11:32 +0000 (20:11 +0200)]
input: extract function

21 months agoview: prevent child views from opening right/bottom of usable area
tokyo4j [Wed, 5 Jun 2024 02:09:10 +0000 (11:09 +0900)]
view: prevent child views from opening right/bottom of usable area

21 months agoIME: fix flicker when popup surface is initially mapped
tokyo4j [Mon, 3 Jun 2024 08:54:49 +0000 (17:54 +0900)]
IME: fix flicker when popup surface is initially mapped

Before this commit, a popup surface was placed at (0,0) on its creation.
So if the popup surface is already mapped on its creation, the popup was
shown at (0,0) then quickly moved to the input-rect on surface commits
or input-rect updates.

21 months agoIME: destroy popup node when popup is destroyed
tokyo4j [Mon, 3 Jun 2024 08:50:13 +0000 (17:50 +0900)]
IME: destroy popup node when popup is destroyed

Before this commit, scene-nodes for IME popup were destroyed when
the bound wl_surface is destroyed. However, this caused a bug that
multiple popup nodes are shown when input_popup_surface_v2 is recreated
with the same wl_surface.

21 months agodocs: add example shutdown file
Narrat [Sat, 1 Jun 2024 21:24:27 +0000 (23:24 +0200)]
docs: add example shutdown file

Closes #1809

21 months agocursor: rate-limit resize events respecting monitor's refresh rate
tokyo4j [Fri, 31 May 2024 06:10:39 +0000 (15:10 +0900)]
cursor: rate-limit resize events respecting monitor's refresh rate

This fixes the lag when resizing windows of some apps on XWayland
(e.g. Chromium and Steam).

21 months agoinput: prevent cursor notifications from pointer and tablet tool
Jens Peters [Tue, 28 May 2024 18:50:05 +0000 (20:50 +0200)]
input: prevent cursor notifications from pointer and tablet tool

... at the same time. Omit cursor notifications from
a pointer when a tablet tool (stylus/pen) is in
proximity. We expect to get cursor notifications
from the tablet tool instead.

21 months agosession-lock: allow client to update cursor shape
tokyo4j [Wed, 29 May 2024 15:53:52 +0000 (00:53 +0900)]
session-lock: allow client to update cursor shape

21 months agosession-lock: fix flashing screen when the session is locked
tokyo4j [Wed, 29 May 2024 15:29:59 +0000 (00:29 +0900)]
session-lock: fix flashing screen when the session is locked

The protocol says screen should be filled with opaque color when the
session is locked, but it allows some delay to wait for the session-lock
client to offer surfaces.

With this commit, filling the sceen with opaque color is delayed by 100ms.

21 months agosession-lock: refactor
tokyo4j [Wed, 29 May 2024 15:13:34 +0000 (00:13 +0900)]
session-lock: refactor

- Replaced `session_lock` with `session_lock_manager` which is
  persistent throughout the session.
- Replaced `session_lock->abandoned` with `session_lock_manager->locked`.
  Old `session_lock->abandoned` is equal to
  `!session_lock_manager->lock && session_lock_manager->locked`.
- Eliminated the use of global variables in `session-lock.c`.
- Changed some function names.

21 months agowayland: add support for security-context-v1
Yuri Nesterov [Thu, 16 May 2024 09:52:47 +0000 (12:52 +0300)]
wayland: add support for security-context-v1

21 months agoinput: send tablet proximity-in only above a valid surface
Jens Peters [Tue, 28 May 2024 18:35:26 +0000 (20:35 +0200)]
input: send tablet proximity-in only above a valid surface

A resize with a tablet tool might end above a
non-tablet capable surface, discard the
proximity-in in that case.

21 months agoinput: postpone tablet notifications when tip or button is pressed
Jens Peters [Sat, 25 May 2024 06:58:53 +0000 (08:58 +0200)]
input: postpone tablet notifications when tip or button is pressed

We should not switch to tablet notifications when an
out-of-surface-move had been started on a non-tablet
capabale surface.

Also postpone proximity-in when moving to a new surface
with the tip down.

21 months agoinput: close xdg-popups on tablet tip or button press
Jens Peters [Fri, 24 May 2024 14:18:24 +0000 (16:18 +0200)]
input: close xdg-popups on tablet tip or button press

21 months agoinput: prevent interference between pointer and tablet tool motion
Jens Peters [Mon, 20 May 2024 21:17:33 +0000 (23:17 +0200)]
input: prevent interference between pointer and tablet tool motion

Move the pointer "out of the way" on proximity-in
to prevent interference with tablet motion.

21 months agodocs: add mouse emulation section
Jens Peters [Wed, 24 Apr 2024 18:36:51 +0000 (20:36 +0200)]
docs: add mouse emulation section

Also clarify tablet button mapping restrictions.

21 months agoconfig: add option for forcing mouse emulation
Jens Peters [Mon, 22 Apr 2024 15:21:55 +0000 (17:21 +0200)]
config: add option for forcing mouse emulation

Default is off. Also allow switching with reconfigure.

21 months agoinput: support button mapping for tablet capable surfaces
Jens Peters [Sun, 21 Apr 2024 19:05:12 +0000 (21:05 +0200)]
input: support button mapping for tablet capable surfaces

Apply the original mapping to mouse buttons and
map those back to stylus buttons.

21 months agoinput: add tablet-v2 notifications for axis and buttons
Jens Peters [Sat, 20 Apr 2024 09:50:33 +0000 (11:50 +0200)]
input: add tablet-v2 notifications for axis and buttons

Similar like touch, this is guarded by checking if
a surface accepts the tablet protocol. Also reuse
common cursor logic.

Intialize tablet tools on proximity.
Notify idle manager about activity on events.

21 months agoinput: handle tablet tool cursor requests
Jens Peters [Sat, 20 Apr 2024 09:46:10 +0000 (11:46 +0200)]
input: handle tablet tool cursor requests

Similar to cursor requests for pointers.

21 months agoinput: add tablet tool setup
Jens Peters [Sat, 20 Apr 2024 09:40:23 +0000 (11:40 +0200)]
input: add tablet tool setup

21 months agoserver: create tablet-v2-manager
Jens Peters [Thu, 11 Apr 2024 21:48:00 +0000 (23:48 +0200)]
server: create tablet-v2-manager

21 months agoprotocols: add tablet-unstable-v2
Jens Peters [Thu, 11 Apr 2024 21:47:35 +0000 (23:47 +0200)]
protocols: add tablet-unstable-v2

21 months agoinput: expose general cursor motion and button functions
Jens Peters [Sat, 20 Apr 2024 09:33:04 +0000 (11:33 +0200)]
input: expose general cursor motion and button functions

Separate the general logic from the pointer notifications
to allow reuse of those function for other (e.g. tablet)
input sources.

21 months agoAdd action UnMaximize
Johan Malm [Sun, 19 May 2024 17:10:44 +0000 (18:10 +0100)]
Add action UnMaximize

Suggested-by: @Vladimir-csp
Fixes: #1825
21 months agosrc/tearing.c: remove listeners on destroy
Consolatis [Mon, 27 May 2024 14:27:35 +0000 (16:27 +0200)]
src/tearing.c: remove listeners on destroy

21 months agoForEach: initialize view query window_type correctly
Consolatis [Mon, 27 May 2024 17:55:16 +0000 (19:55 +0200)]
ForEach: initialize view query window_type correctly

Before this patch, the window type would be checked even if
not actually requested to do so.

Fixes: #1852
21 months agodecorations: fix handling of SSD/non-SSD windows
Tobias Bengfort [Thu, 23 May 2024 04:53:13 +0000 (06:53 +0200)]
decorations: fix handling of SSD/non-SSD windows

Fixup 41a3b6884630eb3299aa66c2152f1b639242999e

Fixes #1841

21 months agoREADME.md: simplify video link table
Johan Malm [Fri, 24 May 2024 20:11:14 +0000 (21:11 +0100)]
README.md: simplify video link table

21 months agoREADME.md: add link to release video
Johan Malm [Fri, 24 May 2024 19:50:26 +0000 (20:50 +0100)]
README.md: add link to release video

21 months agosrc/config/rcxml.c: ensure parent action is available
Consolatis [Wed, 22 May 2024 01:36:33 +0000 (03:36 +0200)]
src/config/rcxml.c: ensure parent action is available

Before this patch, having a branch or query with an invalid or
missing parent action would trigger an assert when trying to
access the parent. This patch ensures that we bail out instead.

Reported-by: fuyukai via IRC (thanks)
21 months agoReplace `_` with `-` in source file names
tokyo4j [Wed, 22 May 2024 00:56:16 +0000 (09:56 +0900)]
Replace `_` with `-` in source file names

21 months agomagnifier: fix high CPU usage even with magnifier disabled
tokyo4j [Mon, 20 May 2024 11:36:30 +0000 (20:36 +0900)]
magnifier: fix high CPU usage even with magnifier disabled

Fixes the high CPU usage issue reported by @droc12345.

Changing `last_mag != is_magnify_on()` to `last_mag == is_magnify_on()`
works fine, but this check isn't needed in the first place because
magnifier state changes call `wlr_output_schedule_frame()`, which sets
`wlr_output->needs_frame`.

Also added a FIXME comment regarding the performance issue when the
magnifier is enabled.

21 months agodoc: fix inconsistent wording
tokyo4j [Tue, 21 May 2024 11:37:38 +0000 (20:37 +0900)]
doc: fix inconsistent wording

Fixup for 34290ef6

21 months agoIME: support multiple IME popups
tokyo4j [Thu, 16 May 2024 05:57:31 +0000 (14:57 +0900)]
IME: support multiple IME popups

We didn't support multiple IME popups since input-method-v2 protocol
has no way to position them individually, but we should support it to
provide IME developers with more programming flexibility.

21 months agoUpdate consumed_by_frame_context for LAB_SSD_ALL
Simon Long [Thu, 2 May 2024 10:00:23 +0000 (11:00 +0100)]
Update consumed_by_frame_context for LAB_SSD_ALL

21 months agoDocumentation
Simon Long [Wed, 1 May 2024 10:30:55 +0000 (11:30 +0100)]
Documentation

21 months agoAdd All context for mouse events
Simon Long [Wed, 1 May 2024 06:28:17 +0000 (07:28 +0100)]
Add All context for mouse events

21 months agoTranslation updates from weblate
Weblate [Thu, 16 May 2024 04:30:31 +0000 (06:30 +0200)]
Translation updates from weblate

Co-authored-by: tark1998 <tark1998@gmail.com>
21 months agoinput: ignore not supported tablet tools
Jens Peters [Tue, 7 May 2024 17:35:44 +0000 (19:35 +0200)]
input: ignore not supported tablet tools

We currently only support cursor emulation
for absolute motion, thus ignore tools/pens
that use relative motion.

Add a log statement on proximity-in to give
some feedback.

21 months agoinput: remove tablet/pad signal listeners on destroy
Jens Peters [Thu, 11 Apr 2024 21:47:10 +0000 (23:47 +0200)]
input: remove tablet/pad signal listeners on destroy

We should remove those when destroying a tablet
or a tablet pad.

Also rename 'tablet' to 'pad' in 'tablet_pad' for better
readability and consistency.

21 months agoseat: announce pointer capability for tablet tool
Jens Peters [Fri, 26 Apr 2024 15:27:36 +0000 (17:27 +0200)]
seat: announce pointer capability for tablet tool

We use pointer focus for the tablet tool, so we
should also use this capability. There is no
dedicated tablet tool capability.

21 months agodecorations: add SetDecorations action
Tobias Bengfort [Sat, 20 Apr 2024 04:29:51 +0000 (06:29 +0200)]
decorations: add SetDecorations action

21 months agodecorations: make has_ssd public
Tobias Bengfort [Fri, 19 Apr 2024 11:35:16 +0000 (13:35 +0200)]
decorations: make has_ssd public

21 months agodecorations: refactor view_set_decorations
Tobias Bengfort [Thu, 18 Apr 2024 07:46:36 +0000 (09:46 +0200)]
decorations: refactor view_set_decorations

21 months agoDeprecate MoveToCursor
Johan Malm [Sun, 19 May 2024 15:50:53 +0000 (16:50 +0100)]
Deprecate MoveToCursor

Use <action name="AutoPlace" policy="cursor"/> instead.

Related-to: #1785
Suggested-by: @tokyo4j
21 months agosrc/main: delay startup of applications until event loop is ready
Consolatis [Sat, 4 May 2024 20:17:24 +0000 (22:17 +0200)]
src/main: delay startup of applications until event loop is ready

This mostly allows for using scripts that trigger a labwc SIGHUP
to work as expected. Before this patch, there was a race between
the event loop starting up and the autostart scripts executing.

One example of such a use-case is dynamically setting the keyboard
layout or cursor theme via environment variable based on feedback
from a dbus service like discussed in #1588.

21 months agoaction: allow configurable policy in AutoPlace action
Andrew J. Hesford [Tue, 7 May 2024 13:46:05 +0000 (09:46 -0400)]
action: allow configurable policy in AutoPlace action

Closes: #1784.
21 months agoSendToDesktop: ensure we focus the topmost view with follow=no
Consolatis [Sat, 18 May 2024 17:01:02 +0000 (19:01 +0200)]
SendToDesktop: ensure we focus the topmost view with follow=no

Fixes: #1800
21 months agoquery: fix crash on missing identifier/title
Tobias Bengfort [Sat, 20 Apr 2024 07:27:42 +0000 (09:27 +0200)]
query: fix crash on missing identifier/title

21 months agoquery: reuse query logic for window rules
Tobias Bengfort [Sat, 20 Apr 2024 05:58:08 +0000 (07:58 +0200)]
query: reuse query logic for window rules

21 months agoquery: add window type filter for if-actions
Tobias Bengfort [Sat, 20 Apr 2024 05:57:35 +0000 (07:57 +0200)]
query: add window type filter for if-actions

21 months agomagnifier: minor refactor
tokyo4j [Thu, 16 May 2024 00:35:47 +0000 (09:35 +0900)]
magnifier: minor refactor

21 months agoAdd screen magnifier
Simon Long [Wed, 15 May 2024 22:07:23 +0000 (23:07 +0100)]
Add screen magnifier

This adds a screen magnifier which can be controlled with the
`ZoomIn` / `ZoomOut` and `ToggleMagnify` actions.

It scales up part of the rendered framebuffer so the magnification
may end up looking blurry depending on the magnification scale.

PR #1774

21 months agoseat: prevent xwayland from using incorrect keymap (#1816)
Hiroaki Yamamoto [Tue, 14 May 2024 20:15:28 +0000 (05:15 +0900)]
seat: prevent xwayland from using incorrect keymap (#1816)

With commit cafdcd8e, the keyboard from the keyboard group is set to the
seat when the active keyboard is destroyed, but this broke `wtype`
against XWayland surfaces. This is likely because XWayland caches
keycodes from the compositor and convert them with the last keymap
received from the compositor. So when we run `wtype a` over a XWayland
surface, the keycode for `a` is cached by XWayland, the keymap from the
keyboard group is sent to XWayland, then Xwayland converts the keycode
using the keymap from the keyboard group, not the one `wtype` set.

This commit fixes this by setting the keyboard from the keyboard group
to the seat when the keyboard focus is moved to a surface, not when the
active keyboard is destroyed.

21 months agokeybind: allow keybinding "-"
Chloé Vulquin [Mon, 13 May 2024 20:56:25 +0000 (22:56 +0200)]
keybind: allow keybinding "-"

Updates #1811

21 months agodesktop: show/hide `top` layer more smartly
tokyo4j [Mon, 13 May 2024 01:18:28 +0000 (10:18 +0900)]
desktop: show/hide `top` layer more smartly

Before this commit, `top` layers were hidden whenever there is a
fullscreen window in the corresponding output.

With this commit, `top` layers are hidden only when there is a fullscreen
window without other windows above it in the corresponding output.

A caveat is that `bottom` layer is still always hidden by a fullscreen
window.

21 months agoCI: add atof() to banned list
Consolatis [Mon, 13 May 2024 08:56:30 +0000 (10:56 +0200)]
CI: add atof() to banned list

21 months agobuild: bump version to 0.7.2
Johan Malm [Fri, 10 May 2024 20:09:29 +0000 (21:09 +0100)]
build: bump version to 0.7.2

21 months agoNEWS.md: update for 0.7.2
Johan Malm [Sun, 5 May 2024 21:06:36 +0000 (22:06 +0100)]
NEWS.md: update for 0.7.2

22 months agoseat: prevent Chromium from crashing when active keyboard is gone
tokyo4j [Mon, 6 May 2024 14:53:18 +0000 (23:53 +0900)]
seat: prevent Chromium from crashing when active keyboard is gone

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.

22 months agoview: fix top-layer not showing when there's a minimized full-screen view
Franz Berger [Tue, 7 May 2024 22:25:44 +0000 (00:25 +0200)]
view: fix top-layer not showing when there's a minimized full-screen view

22 months agorc.xml.all: s/y/height/ in WindowRule ReSizeTo comment
01micko [Wed, 8 May 2024 04:18:03 +0000 (14:18 +1000)]
rc.xml.all: s/y/height/ in WindowRule ReSizeTo comment

22 months agoosd: prevent handling cursor actions in preview mode
Consolatis [Fri, 29 Mar 2024 01:53:53 +0000 (02:53 +0100)]
osd: prevent handling cursor actions in preview mode

Fixes: #1640
Co-Authored-By: tokyo4j <hrak1529@gmail.com>
22 months agoxwayland: prevent shaded views from getting mouse events
Consolatis [Sat, 4 May 2024 21:10:45 +0000 (23:10 +0200)]
xwayland: prevent shaded views from getting mouse events

Fixes: #1753
22 months agomenu: reset parser state in `menu_finish()`
tokyo4j [Sun, 5 May 2024 09:41:10 +0000 (18:41 +0900)]
menu: reset parser state in `menu_finish()`

This fixes use-after-free in `fill_item()` on Reconfigure with
invalid `menu.xml` like below:

<openbox_menu>
  <menu id="root-menu">
    <item id="rofi-run" label="Run command">
      <action name="Execute" command="rofi-run" />
    </item>
  </menu>
</openbox_menu>

22 months agocursor: reload cursor on Reconfigure
Consolatis [Fri, 3 May 2024 12:18:43 +0000 (14:18 +0200)]
cursor: reload cursor on Reconfigure

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
22 months agocursor: implement <menu><ignoreButtonReleasePeriod>
tokyo4j [Fri, 26 Apr 2024 00:03:17 +0000 (09:03 +0900)]
cursor: implement <menu><ignoreButtonReleasePeriod>

Addresses UX degradation introduced by commit 1d3ed457.

This prevents clicks with small movement with the intention of opening
the menu from unexpectedly closing the menu or selecting a menu item.

22 months agodocs: refer labwc-actions(5), not labwc-action(5)
Tomi Ollila [Mon, 29 Apr 2024 20:51:52 +0000 (23:51 +0300)]
docs: refer labwc-actions(5), not labwc-action(5)

22 months agoview: update top layer visibility on map
tokyo4j [Mon, 29 Apr 2024 08:59:12 +0000 (17:59 +0900)]
view: update top layer visibility on map

Steam's Big Picture Mode window requests fullscreen before mapping.

22 months agossd: don't update ssd if view width is too small
tokyo4j [Sat, 27 Apr 2024 09:15:53 +0000 (18:15 +0900)]
ssd: don't update ssd if view width is too small

Clients can ignore the requsted geometry and negative widths could be
passed to `wlr_scene_rect_set_size()` in `ssd_titlebar_update()` or in
`ssd_border_update()`.

22 months agoview: set LAB_MIN_VIEW_WIDTH equal to total width of buttons
tokyo4j [Fri, 26 Apr 2024 11:08:08 +0000 (20:08 +0900)]
view: set LAB_MIN_VIEW_WIDTH equal to total width of buttons

This fixes pixman error due to a negative width passed to
`wlr_scene_rect_set_size()` in `ssd_titlebar_update()`.