tokyo4j
71ad677397
rcxml: simplify the logic to traverse xml tree
2025-07-24 03:00:42 +09:00
tokyo4j
baa5ccdfeb
string-helper: add str_space_only()
2025-07-24 03:00:42 +09:00
tokyo4j
318ee16a7c
rcxml: rewrite <tablet><map> parser
2025-07-24 03:00:42 +09:00
tokyo4j
f84f503795
rcxml: rewrite <theme><font> parser
2025-07-24 03:00:42 +09:00
tokyo4j
a274b59296
rcxml: reorder functions
2025-07-24 03:00:42 +09:00
tokyo4j
0f9b0e7303
rcxml: rewrite <windowRules> parser
2025-07-24 03:00:42 +09:00
tokyo4j
7bee3095e9
rcxml: rewrite <windowSwitcher><fields> parser
2025-07-24 03:00:42 +09:00
tokyo4j
2ae9264f6f
rcxml: rewrite <region> parser
2025-07-24 02:52:53 +09:00
tokyo4j
adcbe08b17
rcxml: rewrite <libinput> parser
2025-07-24 02:52:53 +09:00
tokyo4j
ccd77d32c7
rcxml: rewrite <touch> parser
2025-07-24 02:52:53 +09:00
tokyo4j
4c80df2d93
rcxml: rewrite <margin> parser
2025-07-24 02:52:53 +09:00
tokyo4j
0eb2874c11
rcxml: rewrite <mousebind> parser
2025-07-24 02:52:53 +09:00
tokyo4j
ec2f25bb07
rcxml: rewrite <keybind> parser
2025-07-24 02:52:53 +09:00
tokyo4j
ef4b5f5b4c
rcxml: rewrite action parser
...
This commit rewrites the nested action parser into append_actions() which
is used by following commits. At this point, it's not used yet and parsing
"If" action is temporarily disabled.
2025-07-24 02:51:26 +09:00
tokyo4j
0db146c9af
common/xml: add helpers to parse rc.xml
2025-07-24 02:45:00 +09:00
tokyo4j
75fa053d18
rcxml: convert dotted properties into nested nodes before processing
...
For example, the following node:
<keybind name.action="ShowMenu" menu.action="root-menu"
x.position.action="1" y.position.action="2" />
is converted to:
<keybind>
<action>
<name>ShowMenu</name>
<menu>root-menu</menu>
<position>
<x>1</x>
<y>2</y>
</position>
</action>
</keybind>
...before processing the entire xml tree. This is a preparation to prevent
breaking changes when we refactor rcxml.c to use recursion instead of
encoding nodes into dotted strings.
2025-07-24 02:43:49 +09:00
John Lindgren
1747d9e961
buf: avoid 'new' as variable name
...
It's just good practice to avoid C++ keywords, in case someone
someday wants to compile this code as C++.
2025-07-21 16:51:10 +02:00
John Lindgren
7d2b5150e8
session-lock: eliminate pointless compound literal
...
In C++, this would have caused a use-after-free. In C, the unnamed
array remains in scope longer, so it's okay, but still pointless.
2025-07-21 16:51:10 +02:00
John Lindgren
4afbfac528
src: put designated initializers in member order
...
Out-of-order named initializers are allowed in C (unlike in C++) but
are still surprising - I don't see a reason not to put them in order.
2025-07-21 16:51:10 +02:00
John Lindgren
a802d6b20a
src: avoid tentative definitions of static data
...
Having multiple declarations of the same static data (where one is
considered "tentative") is kind of an obscure C feature -- I didn't
even know the name of it until today. It's also forbidden in C++.
In the case of circular dependencies between static data <-> function,
the more typical pattern is to forward-declare the function, then the
data, then provide the function definition. Let's follow that pattern.
2025-07-21 16:51:10 +02:00
John Lindgren
407a29aa23
string-helpers: remove restrict qualifier
...
'restrict' is harmful as it encourages the compiler to make dangerous
assumptions while increasing cognitive load on the human programmer.
The extra 1% (or whatever) of performance here is not worth the cost.
2025-07-21 16:51:10 +02:00
John Lindgren
681f9e9a7b
src: add braces to switch cases containing declarations
...
This limits the scope of the declarations to avoid accidents.
2025-07-21 16:51:10 +02:00
John Lindgren
b48c250177
src: prefer 'if' over 'goto' where convenient
...
'goto' should not be used for normal control flow.
v2 add comment in lieu of goto label
2025-07-21 16:51:10 +02:00
John Lindgren
8b7ae52a91
src: avoid implicit int/bool -> enum conversions
...
Use the defined enum constants instead.
2025-07-21 16:51:10 +02:00
John Lindgren
cd8a8c2bf6
keybind: pointer to string literal should be const
...
Assigning to (char*) creates a mutable string literal, which was
likely not intended here and wasn't necessary.
2025-07-21 16:51:10 +02:00
John Lindgren
ac47be3019
menu: do not modify literal string constants
...
Mutable string literals are a "legacy" C feature best avoided.
v2: move string_truncate_at_pattern() outside fill_item()
2025-07-21 16:51:10 +02:00
lynxy
2bcd8277c4
comments: added short description to view_edge enum
2025-07-19 12:29:55 +09:00
lynxy
254f526f71
actions: prevent users entering invalid direction=any value
2025-07-19 12:29:55 +09:00
lynxy
13ff64f6e4
actions: added query tiled=any comparison for rc.xml simplification
2025-07-19 12:29:55 +09:00
John Lindgren
359dd8f3c7
img: fix apparent double-free in img_svg_render() failure path
...
img_svg_render() calls g_object_unref() on the RsvgHandle in its
error path, but the handle is owned by the shared lab_img_data
struct and will be double-freed later by lab_img_destroy().
The double-free was introduced when img_svg_load() was split from
img_svg_render(). The g_object_unref() should have been removed from
img_svg_render() but was missed.
Fixes: 16dbdc64e5
("ssd: rework titlebar button rendering")
2025-07-13 16:43:56 +09:00
John Lindgren
bb2d34a5c1
xwayland: fix swapped width/height in _NET_WM_ICON stride calculation
...
Probably slipped through since most window icons are square anyway.
2025-07-13 03:51:40 +02:00
Johan Malm
4beee3851f
build: bump version to 0.9.0
2025-07-11 21:52:18 +01:00
Johan Malm
101180bef4
NEWS.md: update notes for 0.9.0
2025-07-11 21:47:52 +01:00
Consolatis
d6a2ca94c7
docs: update package maintainer list
...
The Arch package is now an official Arch package with
a new maintainer.
The Github account of the Artix Linux maintainer has
been deleted.
2025-07-11 14:02:31 +02:00
Weblate
c9e812ffde
Translation updates from weblate
...
Co-authored-by: Batu <bai@baturax.com>
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Jan Rolski <wbcwknvstb@proton.me>
Co-authored-by: NorwayFun <temuri.doghonadze@gmail.com>
Co-authored-by: Priit Jõerüüt <lxqtwlate@joeruut.com>
Co-authored-by: Roberalz <lumintnian@outlook.com>
Co-authored-by: Sa'eed M Farahani <silitonix@gmail.com>
Co-authored-by: Standreas <standreas@riseup.net>
Co-authored-by: UTUMI Hirosi <utuhiro78@yahoo.co.jp>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: bittin <bittin@reimu.nl>
Co-authored-by: therealmate <hellogaming91@gmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/es/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/et/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/eu/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/fa/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/gl/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/hu/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/it/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ja/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ka/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/nl/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/pl/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/sv/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/tr/
Translation: Labwc/labwc
2025-07-07 19:47:54 +01:00
Kyuyrii
4a22bea0a6
Added information about idle screen inhibitor.
2025-07-06 20:05:51 +01:00
Consolatis
38a1a9bbbc
Disable all output leasing due to a wlroots UAF
2025-07-06 19:59:43 +01:00
Consolatis
4699d446cb
Fix UAF when granting an output lease
...
Wlroots now destroys the wlr_output when granting a lease.
So we can't iterate through the outputs in the request after
granting the lease. This is also not necessary anymore because
they are already destroyed and thus removed from the layout.
2025-07-06 19:59:43 +01:00
Consolatis
d5e93dcfef
src/output.c: remove wlroots 0.18 wlopm with custom-mode workaround
...
The fix has been included in wlroots 0.19.0.
2025-07-06 18:50:33 +01:00
Andrew J. Hesford
d2175b3a8b
src/snap-constraints.c: ignore view origin during constraint updates
2025-07-06 18:45:21 +01:00
Andrew J. Hesford
476fd5f25e
resistance: refactor snap constraints, use in interactive resistance
2025-07-06 18:45:21 +01:00
tokyo4j
3aab0c3b91
Replace alacritty in default keybind with lab-sensible-terminal
2025-07-06 14:11:27 +01:00
Weblate
c931399afc
Translation updates from weblate
...
Co-authored-by: Batu <bai@baturax.com>
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Jan Rolski <wbcwknvstb@proton.me>
Co-authored-by: NorwayFun <temuri.doghonadze@gmail.com>
Co-authored-by: Priit Jõerüüt <lxqtwlate@joeruut.com>
Co-authored-by: Roberalz <lumintnian@outlook.com>
Co-authored-by: Sa'eed M Farahani <silitonix@gmail.com>
Co-authored-by: Standreas <standreas@riseup.net>
Co-authored-by: UTUMI Hirosi <utuhiro78@yahoo.co.jp>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: bittin <bittin@reimu.nl>
Co-authored-by: therealmate <hellogaming91@gmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/es/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/et/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/fa/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/hu/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/it/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ja/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ka/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/nl/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/pl/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/sv/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/tr/
Translation: Labwc/labwc
2025-07-06 14:04:28 +01:00
Johan Malm
76c954fcc9
docs/menu.xml: remove Poweroff to align with builtin menu
2025-07-01 22:27:33 +01:00
Johan Malm
c749a11517
menu: add Terminal to default root-menu
2025-07-01 22:27:33 +01:00
Johan Malm
e94781ef3f
Add lab-sensible-terminal
...
Related-to: #2843 #2842
2025-07-01 22:27:33 +01:00
tokyo4j
d7fd23e52d
rcxml: revise drag-lock behavior and option names
...
This revises the changes done in 22d319c :
- Cancel defaulting to <dragLock>sticky<dragLock>. So labwc now disables
drag-lock by default, as libinput does.
- Update the options from [yes|no|sticky] to [timeout|no|yes] to
emphasize that the "sticky" mode (now "yes") is recommended when using
drag-lock.
2025-07-01 03:00:55 +09:00
Johan Malm
e365d5eaf0
layers.c: fix UAF bug on TTY change
...
Call seat_set_focus_layer(seat, NULL) in node-destroy-handler to avoid
seat->focused_layer becoming invalid and causing UAF issues in certain
situations like when outputs (and therefore layer-trees) are destroyed.
Fixes : #2863
Helped-by: @Consolatis
2025-06-29 23:22:05 +02:00
Consolatis
ca01dcaa95
main: add feature flags to --version
2025-06-28 20:33:57 +01:00
Consolatis
e0d1dc436d
server.c: remove wlroots 0.16 era workaround for xwayland drm leases
...
We instead rely on the fixes in xwayland being widely available.
This also re-enables VR headsets for X11 applications.
Fixes : #553
2025-06-28 20:33:57 +01:00