Commit graph

2113 commits

Author SHA1 Message Date
tokyo4j
e00f7cd6db view: validate move/resize request from clients
Move/resize requests from xwayland views and xdg toplevels should be
ignored when the view is not pressed.

This is relevant for touchpad taps with <tapAndDrag> disabled.

When the user taps the client surface (e.g. chromium and mpv) with the
setting above, libinput sends button press & release signals so quickly
that the compositor receives move/resize request from the client AFTER
the button release signal is processed, so `interactive_finish()` is
never called.
2024-03-07 20:30:50 +00:00
tokyo4j
f6d588507e style: prettify comments
Prettify comments formatted by clang-format at commit 77328698
2024-03-07 20:30:50 +00:00
Consolatis
95e8573388 src/output.c: refactor virtual output related functions
This commit moves the virtual output related functions
into their own file at `src/output-virtual.c` with its
own include file to reduce `include/labwc.h` bit by bit.

Additionally, it removes the need to keep the
`server->headless.pending_output_name` char array around
by temporarily disconnecting the handler when creating a
new virtual output. This allows to set the output name
right in the `output_virtual_add()` call rather than to
store the pending name until the new output event handler
has been called.

It also makes adding a virtual fallback output easier in
a follow-up PR.
2024-03-07 19:51:54 +00:00
Weblate
40ce95a68c Translation updates from weblate
Co-authored-by: Abdullah Albaroty <albaroty@gmail.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/ar/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/de/
Translation: Labwc/labwc
2024-03-06 18:37:18 +00:00
Consolatis
1b9176c427 src/action.c: remove assumption about MoveToOutput direction being valid 2024-03-06 18:34:56 +00:00
Consolatis
983ca66d07 src/action.c: fix MoveToOutput action by renaming 'name' argument
We were using the argument name 'name' before
which is already used by the action itself:
`<action name="MoveToOutput" name="HDMI-A-1" />`

Change the argument name to "output" which also
matches the `FocusOutput` action.

Fixes: #1589
Reported-by: @bnason (thanks!)
2024-03-06 18:34:56 +00:00
Andrew J. Hesford
bcf2d7e091 docs/labwc.1: fix LABWC_PWD -> LABWC_PID typo 2024-03-05 17:51:10 -05:00
Johan Malm
4d68ee424a osd: show preview for windows on other workspaces
Written-by: @Consolatis
2024-03-05 22:16:55 +01:00
Johan Malm
72a41058af osd: only call wl_array_{init,relesase} once 2024-03-05 22:16:55 +01:00
Johan Malm
247d2b581c osd: optionally show windows on all workspaces
Also share common config option (rc.window_switcher.criteria) in osd.c and
desktop.c to make sure the window lists are always consistent.

Configure with `<windowSwitcher allWorkspaces="yes|no">`
2024-03-05 22:16:55 +01:00
Johan Malm
41419d9479 osd: do not use server->workspace_current->tree
...as it is no longer needed following the use of shared infrastructure
between osd.c and desktop.c introduced in the last few commits.
2024-03-05 22:16:55 +01:00
Johan Malm
7704b595d3 osd: restore preview at end of cycling
...so that sub-views are shown in front of root ones.
2024-03-05 22:16:55 +01:00
Johan Malm
79bca44cb1 window-rules: add root-toplevel critiera 2024-03-05 22:16:55 +01:00
Johan Malm
c71fccbcec osd: include always-on-top views in window-switcher 2024-03-05 22:16:55 +01:00
Johan Malm
777e6bb868 desktop: refactor desktop_cycle_view()
...in preparation for using common window-rule criteria with osd.c

No functional change intended.

Related-to #1454
2024-03-05 22:16:55 +01:00
John Lindgren
6a35e8e78c view: remove view_is_related(), no longer used 2024-03-05 20:51:32 +00:00
John Lindgren
bb8f0bc960 seat: don't deactivate view for any non-view surface
Now we now longer gray-out the active window when opening a focusable
popup menu (e.g. the applications menu from an XWayland panel). This
matches Openbox behavior.
2024-03-05 20:51:32 +00:00
John Lindgren
11cdad0c11 Revert "desktop: allow re-focus between "globally active" views of the same PID"
This is undesired when a focusable popup (e.g. applications menu) of an
unfocusable view (e.g. XWayland panel) is closed.

This reverts commit f6e3527767.
2024-03-05 20:51:32 +00:00
John Lindgren
4eb34f97de xwayland: remove "try to focus on parent surface" logic
This was apparently to fix an Intellij focus issue, but I don't see any
issues with Intellij currently, and the logic is wrong when the parent
XWayland surface doesn't want focus (e.g. an XWayland panel with a
focusable applications menu).
2024-03-05 20:51:32 +00:00
John Lindgren
9e3785f8cd xwayland: treat Globally Active windows according to type
Tested with IntelliJ IDEA and JDownloader 2, which were problematic in
the past.

Fixes: #1139 #1341
2024-03-05 20:51:32 +00:00
Simon Long
3ebc07f7aa
Handle touch on headerbar (#1550)
...using cursor emulate events.
2024-03-05 20:41:17 +00:00
tokyo4j
334cd09106 IME: support input method 2024-03-05 20:28:15 +00:00
Consolatis
7e60c57b81 src/server.c: filter out xwayland shell for usual clients 2024-03-04 21:35:40 +00:00
Consolatis
74501bc7fa src/output.c: restore flicker free resize when running nested
PR #1301 did partly revert the first variant because
`lab_wlr_scene_output_commit()` (which uses the `output->pending`
state in contrast to `wlr_scene_output_commit()`) was deemd to
cause 'frozen' frames during video playback (#1273).

We are now back at using `lab_wlr_scene_output_commit()` for
unrelated reasons and the cause of the original issue #1273 was
likely that `wlr_scene_output_send_frame_done()` was only sent
on a successful commit. This was changed to always be sent.

So lets restore the flicker free nested resize as well.
2024-03-04 21:24:17 +00:00
Standreas
f250c6ba12
Add weblate information (#1581)
...and some sub-headings
2024-03-04 21:20:08 +00:00
John Lindgren
c78750283f key-state: use struct assignment 2024-03-04 02:27:40 +01:00
Andrew J. Hesford
0af7bc886a docs/labwc.1: restructure, document session management 2024-03-04 01:57:32 +01:00
Andrew J. Hesford
c9d08f8218 session: only update activation environment...
...when running DRM backend or by explicit request
2024-03-04 01:57:32 +01:00
David F
22fe8cf546
session.c: updated dbus activation environment with more env vars
Fixes: #694
2024-03-03 18:47:58 +01:00
Andrew J. Hesford
f90b7dca2a session: run shutdown script, clean up activation env before exit 2024-03-02 21:30:03 -05:00
Johan Malm
4ddeb3cd42 action: reduce MoveToOutput logging 2024-03-02 21:23:01 +00:00
Johan Malm
3c3bcc2765 view: add MoveToOutput wrap attribute
Support `wrap` in view_get_adjacent_output(). This means that when seeking
an adjacent output in a particular direction from an output that is
already furthest in that direction within the layout, rather than
returning NULL, wrap around from the leftmost to the rightmost, or topmost
to the bottommost and vice versa.

Example usage:

    <action name="MoveToOutput" direction="right" wrap="yes" />

Wrap is disabled by default to keep the user interface consistent.
2024-03-02 21:23:01 +00:00
Johan Malm
7e338fc365 view: fix view_get_adjacent_output() bug
...when using more than two outputs.

Use the centre of the view's output as the reference coordinate when
seeking adjacent outputs.

Fixes: #1582
2024-03-02 21:23:01 +00:00
Birger Schacht
1ea7e8b494 fix: typo in labwc-config.5.scd
specifc -> specific
2024-03-02 08:44:09 +01:00
01micko
5b2b1c31ab CONTRIBUTING.md: correct the instructions for adding a locale code 2024-03-02 02:48:02 +01:00
zenobit
5a70027e30 Add cs language 2024-03-02 02:44:55 +01:00
Johan Malm
59014e5071 build: bump version to 0.7.1 2024-03-01 21:18:02 +00:00
Johan Malm
e734519990 NEWS.md: update for 0.7.1 2024-03-01 21:13:37 +00:00
Weblate
9b47a5e11e Translation updates from weblate
Co-authored-by: Alice Ventus <zolkin.ag@phystech.edu>
Co-authored-by: Jouni Järvinen <jounijarvis@gmail.com>
Co-authored-by: Moo <hazap@hotmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/fi/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/lt/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ru/
Translation: Labwc/labwc
2024-02-29 21:50:15 +00:00
Consolatis
43e29f1f8d docs/rc.xml: remove gap from the example config
Some distro packages install the example config at /etc/xdg/labwc/rc.xml
and thus users of those packages were having a gap 10 setting by default.

Lets remove the gap from the example config to match our intended default.
2024-02-28 20:51:17 +00:00
Consolatis
d3c5b0ebb8 CONTRIBUTING.md: Void maintainer nick change 2024-02-28 19:30:31 +01:00
Jens Peters
7110b7cf3e docs: add sendEventsMode to libinput snippet 2024-02-25 20:35:03 +01:00
Consolatis
ccbc75571a src/xdg-popup.c: delay popup unconstrain until after first commit
Fixes: #1372
2024-02-25 11:49:03 +00:00
Consolatis
598ab9bcff src/layers.c: delay popup unconstrain until after first commit
Fixes: #1372
2024-02-25 11:49:03 +00:00
Weblate
fb1a0a2bdf Translation updates from weblate
Co-authored-by: Sabri Ünal <libreajans@gmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/tr/
Translation: Labwc/labwc
2024-02-24 20:37:00 -05:00
Sachin Bhat
6fb06c54c2 config: support libinput sendEventsMode
This allows to enable / disable libinput devices.

Co-Authored-By: @Consolatis
2024-02-24 21:36:53 +01:00
Jens Peters
9456b50983 seat: fix configure condition for click method
Exclude none (zero) from the bitmask test , otherwise
the bitmask test is always true when click method is
configured to 'none' and as a result the configuration
will be skipped.
2024-02-24 20:39:54 +01:00
Consolatis
7adf5533f9 src/output.c: log when disabling adaptive_sync on a nested labwc 2024-02-22 23:40:03 +01:00
Consolatis
d69faffc4e src/output.c: notify clients about config errors
Preliminary fix for #1525.

Based on the protocol we should also revert all
previously correctly committed outputs. #1528
is doing just that but may cause regressions so
we need a short term solution and then deal with
potential issues in #1528 after the release.
2024-02-22 23:40:03 +01:00
Johan Malm
1aa906e0de README.md: Add screenshot description
...and use the png files on the labwc website rather than imgur.

Fixes: #1363
2024-02-22 17:49:49 +01:00