Commit graph

2417 commits

Author SHA1 Message Date
Weblate
7440c5096a Translation updates from weblate
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/
Translation: Labwc/labwc
2024-06-23 14:32:17 +01:00
stefonarch
832c007e6b Updated labwc.pot file 2024-06-23 12:33:36 +01:00
tokyo4j
2e00630d80 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`.
2024-06-23 01:02:03 +02:00
tokyo4j
edd674f96b po/meson.build: minor formatting 2024-06-23 01:02:03 +02:00
Jens Peters
1495708095 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
2024-06-18 22:14:40 +01:00
Jens Peters
b63c6a0fc2 action: add ToggleTabletMouseEmulation
Useful for switching between application-defined and
mapped tablet  pad buttons. Also for quickly troubleshooting
tablet behavior.
2024-06-18 22:13:28 +01:00
Johan Malm
1dadb12807 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'
2024-06-15 21:31:00 +01:00
Simon Long
99893e63c3 Typo 2024-06-15 21:22:58 +01:00
Simon Long
2573162a4f Use existing reset_keybind function 2024-06-15 21:22:58 +01:00
Simon Long
e6c239e783 Move extern to h file 2024-06-15 21:22:58 +01:00
Simon Long
5b1ab48abf Fix release keybindings being triggered after mouse bindings 2024-06-15 21:22:58 +01:00
tokyo4j
bb1d0b4352 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.
2024-06-15 21:17:01 +01:00
tokyo4j
25415eb7ab src/theme.c: add zero_array() macro 2024-06-15 21:17:01 +01:00
Johan Malm
4ee538c6cd 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>
2024-06-13 23:17:16 +02:00
Jens Peters
dc27be2471 docs: clarify tablet button mapping 2024-06-13 21:23:37 +01:00
Jens Peters
3c0cea92f2 input: support tablet-v2 pad notifications 2024-06-13 21:23:37 +01:00
Jens Peters
61e5e0e4d9 input: track tablets and tablet-pads at seat 2024-06-13 21:23:37 +01:00
Jens Peters
ca317506c0 input: run mousebind action only on button pressed 2024-06-13 21:23:37 +01:00
Weblate
85a8f3aea3 Translation updates from weblate
Co-authored-by: The Silitonix <silitonix@gmail.com>
2024-06-13 21:22:11 +01:00
Johan Malm
d4756f62eb keyboard: handle onRelease keybind after long press
...that is longer than the specified repeatDelay interval.
2024-06-12 20:50:23 +01:00
Consolatis
067c59e526 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
2024-06-11 21:40:06 +01:00
Johan Malm
9ff7f27dab NEWS.md: interim update 2024-06-10 19:53:26 +01:00
Consolatis
d044b869c4 src/button/button-svg: reduce debug log spam 2024-06-10 19:52:37 +01:00
Simon Long
84c222a84f 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
2024-06-09 21:15:58 +01:00
Jens Peters
f6c91c8d13 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.
2024-06-08 22:33:00 +01:00
Jens Peters
ebe81ac591 input: extract function 2024-06-08 22:33:00 +01:00
tokyo4j
3dd4bc7c3b view: prevent child views from opening right/bottom of usable area 2024-06-05 19:52:10 +02:00
tokyo4j
1cd9940307 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.
2024-06-04 03:59:56 +09:00
tokyo4j
5ef50986c2 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.
2024-06-04 03:59:56 +09:00
Narrat
bbe60088e5 docs: add example shutdown file
Closes #1809
2024-06-01 23:53:34 +02:00
tokyo4j
4073a6b923 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).
2024-05-31 17:28:43 +02:00
Jens Peters
2388f37cc7 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.
2024-05-31 16:59:43 +02:00
tokyo4j
d00711bc45 session-lock: allow client to update cursor shape 2024-05-31 11:21:29 +09:00
tokyo4j
9e5ea88c70 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.
2024-05-31 11:21:29 +09:00
tokyo4j
a39c8afc10 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.
2024-05-31 11:21:29 +09:00
Yuri Nesterov
65f7499f1c wayland: add support for security-context-v1 2024-05-29 22:28:06 +01:00
Jens Peters
15135465d9 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.
2024-05-28 22:05:06 +02:00
Jens Peters
d65f56e8a5 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.
2024-05-27 22:40:50 +02:00
Jens Peters
4b17083aa0 input: close xdg-popups on tablet tip or button press 2024-05-27 22:40:50 +02:00
Jens Peters
caf9c9a599 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.
2024-05-27 22:40:50 +02:00
Jens Peters
6a9564c18c docs: add mouse emulation section
Also clarify tablet button mapping restrictions.
2024-05-27 22:40:50 +02:00
Jens Peters
6d05bed883 config: add option for forcing mouse emulation
Default is off. Also allow switching with reconfigure.
2024-05-27 22:40:50 +02:00
Jens Peters
be72c4bde3 input: support button mapping for tablet capable surfaces
Apply the original mapping to mouse buttons and
map those back to stylus buttons.
2024-05-27 22:40:50 +02:00
Jens Peters
fb57d61f35 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.
2024-05-27 22:40:50 +02:00
Jens Peters
63744951af input: handle tablet tool cursor requests
Similar to cursor requests for pointers.
2024-05-27 22:40:50 +02:00
Jens Peters
abfa100b38 input: add tablet tool setup 2024-05-27 22:40:50 +02:00
Jens Peters
9c219564be server: create tablet-v2-manager 2024-05-27 22:40:50 +02:00
Jens Peters
f0a12bb15d protocols: add tablet-unstable-v2 2024-05-27 22:40:50 +02:00
Jens Peters
634a2beb31 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.
2024-05-27 22:40:50 +02:00
Johan Malm
b1b48537a1 Add action UnMaximize
Suggested-by: @Vladimir-csp

Fixes: #1825
2024-05-27 21:02:31 +01:00