Commit graph

2442 commits

Author SHA1 Message Date
Standreas
f2b6661db4 Fix typo in rc.xml.all 2024-08-24 10:16:42 -04:00
Andrew J. Hesford
b7bccc8026 ssd: add optional omnipresent button 2024-08-24 05:42:38 +02:00
Andrew J. Hesford
186a07be9b ssd: add optional shade button 2024-08-24 05:42:38 +02:00
tokyo4j
9f2eae672c ssd: fix incorrect cursor shape on titlebar corner without buttons
Before this commit, the backgrounds of titlebar corners were tagged as
LAB_SSD_PART_CORNER_TOP_{LEFT,RIGHT}, so the cursor shape on titlebar
corners without buttons were north-west or north-east.

This commit fixes it by tagging those backgrounds as
LAB_SSD_TITLEBAR_CORNER_{LEFT,RIGHT}.
2024-08-23 20:34:03 +02:00
Consolatis
23a9df0f30 common/buf.c: use 0 directly in vsnprintf()
This works around a wrong truncation warning in older GCC versions:
```
../src/common/buf.c:110:10: error: null destination pointer [-Werror=format-truncation=]
  110 |  int n = vsnprintf(NULL, size, fmt, ap)
```
2024-08-23 20:20:50 +02:00
tokyo4j
b667107d1a input: move <scrollFactor> to <libinput> section
This allows per-device configuration of scroll factor (e.g. setting
different scroll factors for mice and touchpads).
2024-08-23 16:20:56 +09:00
Johan Malm
228a74ca48
Merge pull request #2088 from xi/titlelayout
theme: implement titleLayout
2024-08-21 19:20:34 +01:00
droc12345
8fda9968e6
menu: add title theme options (#2097)
Add theme options `menu.title.text.color` and `menu.title.text.justify`.

Add font place MenuHeader: `<font place="MenuHeader">`

Add `Oblique` font style

```
<theme>
  <font>
    <slant>Oblique</slant>
  </font>
</theme>
```
2024-08-21 18:27:07 +01:00
Johan Malm
6564e1bc8d buf: add buf_add_fmt() 2024-08-21 16:09:44 +02:00
Tobias Bengfort
a28a3737b9 refactor ssd_titlebar_create 2024-08-20 23:04:10 +02:00
Tobias Bengfort
39ff873d5b ssd: apply title layout 2024-08-20 23:04:10 +02:00
Tobias Bengfort
9a252249c9 ssd: add titleLayout setting 2024-08-20 23:04:10 +02:00
Jens Peters
cd961b1ac1 action: add Enable/DisableTabletMouseEmulation
Useful for window rules.
2024-08-20 21:45:59 +01:00
Johan Malm
107d84cef9 scaled-font-buffer.c: initialize buffer to avoid bug waiting to happen 2024-08-20 18:01:22 +01:00
Johan Malm
9bc381d9e8 menu: use theme->menu_item_height instead of menu->item_height
...and set it in theme.c post_processing()
2024-08-20 18:01:22 +01:00
Johan Malm
0552c6b7f0 menu: support titles
...defined by `<separator label="">`.

Also add the theme option `menu.title.bg.color: #589bda`

The following will be added in separate commits
- menu.title.bg.border.color: #7cb6ec
- menu.title.text.color: #ffffff
- menu.title.text.justify: center
2024-08-20 18:01:22 +01:00
Johan Malm
a368bbee6a Add unit test for common/buf.c 2024-08-20 18:31:53 +02:00
Consolatis
5ae9eed1ac
src/menu: prevent delayed pipe menu response on item destroy (#2094)
Without this patch we would happily access `pipe_ctx->item`
members even if the item had been destroyed in the meantime.
2024-08-20 17:09:17 +01:00
Weblate
c4b8b53198 Translation updates from weblate
Co-authored-by: Peter  Jespersen <flywheel@illogical.dk>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/da/
Translation: Labwc/labwc
2024-08-18 21:47:36 +01:00
Weblate
05bbb9b386 Translation updates from weblate
Co-authored-by: Peter  Jespersen <flywheel@illogical.dk>
2024-08-18 19:17:41 +01:00
Tobias Bengfort
7125a312aa ssd: do not draw background for individual buttons 2024-08-18 10:50:27 +02:00
Consolatis
497d3d8e05 output: set 'labwc' as app_id and title for nested outputs 2024-08-16 22:02:00 +01:00
Johan Malm
33820c2ad1 xwayland: remove dissociate work-around
...to cope with pre-wlroots-0.18.0 behaviour resulting in dissociate
events being emitted without a prior associate one.
2024-08-16 22:47:08 +02:00
tokyo4j
8b12b50137 xdg: destroy foreign toplevel handle on unmap
xdg-shell protocol says:
    All active operations (e.g., move, resize) are canceled and all
    attributes (e.g. title, state, stacking, ...) are discarded for an
    xdg_toplevel surface when it is unmapped.
So, when a xdg-toplevel is unmapped (not minimized), the corresponding
foreign handler should be destroyed to reset attributes.
2024-08-16 21:38:15 +01:00
tokyo4j
f31457392b xwayland: sync foreign-toplevel and associated outputs on re-map
Fixes a bug that `zwlr_foreign_toplevel_handle_v1::output_enter` is not
sent when a xwayland surface is re-mapped (e.g. opening Slack desktop
app when it's running in background).
2024-08-16 21:38:15 +01:00
Johan Malm
98c876d796 build: bump version to 0.8.0 2024-08-16 16:41:36 +01:00
Johan Malm
c63dce83c4 NEWS.md: update notes for 0.8.0 2024-08-16 16:40:24 +01:00
Consolatis
6a1ecd6b7d scene-helpers: use pending_commit_damage, chases wlr!4253
Using the output damage_ring for early out will break VRR in
direct scanout mode. The reason being that the damage_ring
will be completely ignored in that mode so we need to check
`output->pending_commit_damage` instead. This matches with
what wlroots has been doing since [0] and it was missed in
the initial port to wlroots 0.18.x.

However, that would then break the magnifier which only adds
its damage to the damage ring. After some discussion with
the wlroots devs we came up with a solution that should work
for both, wlroots 0.18.0 and when [1] is backported to 0.18.1.

Note that even with this PR, VRR in direct scanout mode is
broken in 0.18.0 from the wlroots side and will be fixed once
[1] is backported to the 0.18 branch and 0.18.1 is released.

Fixes: #2078

[0] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4253
[1] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4753
2024-08-15 20:51:20 +01:00
Jens Peters
00512d055f input: ensure that our own tablet structs are created 2024-08-13 18:40:34 +02:00
Jens Peters
dd0cee02a4 input: move cursor event listeners from tablet to seat
Otherwise we would subscribe multiple times to the
same event when having multiple tablets.
2024-08-13 18:40:34 +02:00
Jens Peters
538eb3ee83 input: use CONNECT_SIGNAL macro 2024-08-13 18:40:34 +02:00
tokyo4j
6687640665 xdg: fix error when launching windowed Chromium
Chromium sends 2 commits before the commit with a buffer attached. We
were just checking `wlr_box_empty(&view->pending)` to handle the cases
where an initially maximized/fullscreen client is windowed, but that
check was also returning true on the 2nd commit from Chromium, resulting
in an error message: "view has empty geometry, not centering".
2024-08-11 16:48:40 -04:00
tokyo4j
de38c771fc xdg-activation: temporarily disable source surface verification
71451173 validates the xdg-activation token more strictly by verifying
the source surface attached to the token. That  improves the security by
preventing arbitrary focus-stealing.

However, not all clients attach a right source surface to the token or
use the received token for activation. For example, when a notification
client requests thunderbird to activate its window, thunderbird doesn't
use the token passed by the notification client and instead use their own
token, thus the activation is rejected as the surface attached to the
token is not focused.

We will add options to configure the policy for activation requests or
implement urgency hint in some way in the future and reland the source
surface verification.
2024-08-11 09:33:26 +02:00
Johan Malm
72df8fe73c keyboard: fix bug with empty XKB_DEFAULT_LAYOUT
With XKB_DEFAULT_LAYOUT= (set to empty rather than unset) the keyboard
just does not work.

Ref: https://github.com/labwc/labwc-tweaks/issues/89
2024-08-08 21:35:06 +02:00
Jens Peters
f20b2c7632 input: apply tablet rotation before area transformation
This makes the behavior consistent with auto-rotation
as a result of output mapping.
2024-08-08 20:27:06 +01:00
Jens Peters
df12572f29 docs: clarify tablet rotation for mapped outputs 2024-08-08 20:27:06 +01:00
Jens Peters
060626e9c7 input: subscribe to tablet tool events from cursor
Contrary to the raw tablet events, the cursor events transform
the coordinates based on a mapped output orientation.
Otherwise those events are the same.
2024-08-08 20:27:06 +01:00
tokyo4j
670cc0f511 Rename <snapping><dragResistance> to <resistance><unSnapThreshold>
As we already have <resistance><{screen,window}EdgeStrength>,
<resistance> will be a better place for this setting.
2024-08-08 09:49:53 +09:00
Johan Malm
dc387f7765 NEWS.md: interim update 2024-08-07 21:48:27 +01:00
Jens Peters
433a4509af
tearing: add fullscreen options (#1941)
Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
2024-08-06 21:23:10 +01:00
Johan Malm
19f0b769de labwc-config(5): minor refactor to fix pandoc rendering 2024-08-06 21:01:36 +02:00
Tobias Bengfort
116382fd89 keybind: implement allowWhenLocked
fixes #2034

see bc258a3be2/sway/sway.5.scd (L409)
2024-08-06 19:15:06 +02:00
Tobias Bengfort
6dd0d69889 docs: integrate onRelease into keybind 2024-08-06 19:15:06 +02:00
John Lindgren
0f6d5cc26a view: stay fullscreen when view's output is disconnected
I intended to fix this quite some time ago but didn't get around to it.

I don't think there's any good reason why we need to un-fullscreen a
view when its output is disconnected. We can handle it the same as a
maximized view, and move it to a new output (remaining fullscreen) or,
if all outputs are disconnected, just leave it as-is.

This is helpful for a media-center use-case, where you have just one
view (e.g. Kodi) fullscreen all the time, but the TV might appear to be
disconnected if you switch it to a different source.

Tested with a couple different scenarios:

1. Single output disconnected and re-connected: view stayed fullscreen.
2. Secondary output disconnected: view stayed fullscreen but moved to
   the primary output, and the layer-shell panel on that output was
   hidden as expected. When the secondary output was re-connected, the
   view was moved back (still fullscreen) and the panel on the primary
   appeared again.

Fixes: #864
2024-08-06 19:00:47 +02:00
Consolatis
f14f006cba CI: Install libwlroots-0.18-dev for the Debian runner 2024-08-06 15:25:50 +02:00
John Lindgren
1a339f9c7e xdg: account for drag resistance in do_late_positioning()
The position where the view should be anchored can now be slightly
different from the current cursor position.

Addresses a TODO from #2009.
2024-08-06 13:51:35 +09:00
Consolatis
4bda13d870 CI: increase speed of codestyle check
by running up to nproc ones in parallel
2024-08-04 21:01:50 +02:00
tokyo4j
c202d77c2d Add resistance when dragging tiled windows
Adds a config option <snapping><dragResistance> with default value 20.
This prevents tiled/maximized windows from being unintentionally untiled.
2024-08-02 23:40:26 +02:00
Consolatis
750d37b16c multirect: remove destroy listener before freeing
Detected by `-Db_sanitize=address,undefined` for libwayland
2024-07-26 22:52:16 +02:00
Johan Malm
92db067e86 NEWS.md: update for 0.7.4 2024-07-24 18:35:46 +02:00