Commit graph

2505 commits

Author SHA1 Message Date
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
Consolatis
21f079e306 src/tearing.c: remove listeners on destroy 2024-05-27 20:00:26 +01:00
Consolatis
6f3f2aae27 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
2024-05-27 19:59:06 +01:00
Tobias Bengfort
95e4c0d8d7 decorations: fix handling of SSD/non-SSD windows
Fixup 41a3b68846

Fixes #1841
2024-05-27 14:34:52 +01:00
Johan Malm
8ce8e93d00 README.md: simplify video link table 2024-05-26 15:57:53 +02:00
Johan Malm
8a5602ee81 README.md: add link to release video 2024-05-24 21:05:15 +01:00
Consolatis
a7298314a4 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)
2024-05-22 07:12:03 +01:00
tokyo4j
23b96ad2a6 Replace _ with - in source file names 2024-05-22 07:10:51 +01:00
tokyo4j
48742163fd 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.
2024-05-21 17:41:01 +02:00
tokyo4j
c1646ef2ea doc: fix inconsistent wording
Fixup for 34290ef6
2024-05-21 20:43:08 +09:00
tokyo4j
2f1fcb4468 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.
2024-05-20 09:35:26 +09:00
Simon Long
1c334cc918 Update consumed_by_frame_context for LAB_SSD_ALL 2024-05-19 22:17:04 +01:00
Simon Long
6c7cdc246e Documentation 2024-05-19 22:17:04 +01:00