Commit graph

2281 commits

Author SHA1 Message Date
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
Simon Long
ed1b631492 Add All context for mouse events 2024-05-19 22:17:04 +01:00
Weblate
ecb7267686 Translation updates from weblate
Co-authored-by: tark1998 <tark1998@gmail.com>
2024-05-19 21:56:16 +01:00
Jens Peters
f8a7d18cf0 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.
2024-05-19 21:21:52 +01:00
Jens Peters
163f11595f 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.
2024-05-19 21:21:52 +01:00
Jens Peters
b6e439a5cc 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.
2024-05-19 21:21:52 +01:00
Tobias Bengfort
41a3b68846 decorations: add SetDecorations action 2024-05-19 19:03:42 +01:00
Tobias Bengfort
e2590f10fd decorations: make has_ssd public 2024-05-19 19:03:42 +01:00
Tobias Bengfort
a0debda142 decorations: refactor view_set_decorations 2024-05-19 19:03:42 +01:00
Johan Malm
bab1be834d Deprecate MoveToCursor
Use <action name="AutoPlace" policy="cursor"/> instead.

Related-to: #1785
Suggested-by: @tokyo4j
2024-05-19 19:57:20 +02:00
Consolatis
941290fb4b 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.
2024-05-19 18:49:43 +01:00
Andrew J. Hesford
89589f17c4 action: allow configurable policy in AutoPlace action
Closes: #1784.
2024-05-19 17:32:52 +01:00
Consolatis
208f383c66 SendToDesktop: ensure we focus the topmost view with follow=no
Fixes: #1800
2024-05-19 16:19:04 +01:00
Tobias Bengfort
b6ecb1068e query: fix crash on missing identifier/title 2024-05-18 20:04:08 +01:00
Tobias Bengfort
e7ebb48cce query: reuse query logic for window rules 2024-05-18 20:04:08 +01:00
Tobias Bengfort
7bc3cae91a query: add window type filter for if-actions 2024-05-18 20:04:08 +01:00
tokyo4j
b9b870cfa7 magnifier: minor refactor 2024-05-16 11:33:53 +02:00
Simon Long
8ba066a1a5
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
2024-05-16 00:07:23 +02:00
Hiroaki Yamamoto
ad15c0474d
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.
2024-05-14 21:15:28 +01:00
Chloé Vulquin
daa0308932 keybind: allow keybinding "-"
Updates #1811
2024-05-14 16:30:49 +02:00
tokyo4j
1c8d347a61 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.
2024-05-14 15:57:27 +02:00
Consolatis
6fe3df34ca CI: add atof() to banned list 2024-05-13 11:06:04 +02:00
Johan Malm
b41af54a1b build: bump version to 0.7.2 2024-05-10 21:11:21 +01:00
Johan Malm
4d6e3dd90b NEWS.md: update for 0.7.2 2024-05-10 21:07:05 +01:00
tokyo4j
cafdcd8e19 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.
2024-05-08 20:39:09 +01:00