Commit graph

3264 commits

Author SHA1 Message Date
Johan Malm
70e5beb5ec build: bump version to 0.9.2
Some checks failed
labwc.github.io / notify (push) Has been cancelled
2025-10-10 19:53:23 +01:00
tokyo4j
d94e5da815 view: fix unexpected view->tiled with SnapToEdge against centered view
In 2ac4811, I was missing that windows can be tiled to "center".
As a result, after executing
`<action name="SnapToEdge" combined="yes" direction="left" />` against a
center-tiled window, `view->tiled` is set to `CENTER|LEFT`.
2025-10-10 19:48:42 +01:00
Johan Malm
e44a489530 NEWS.md: update notes for 0.9.2 2025-10-10 19:37:40 +01:00
tokyo4j
6cdfe32af0 rcxml: move <maximizedDecoration> from <core> to <theme> 2025-10-09 22:01:05 +01:00
Tobias Bengfort
e1820adcd3 fix typo in comment 2025-10-10 00:19:22 +09:00
Tobias Bengfort
474c513ed6 fix double free for libxml2 < 2.13
xmlAddChild() only unlinks the second argument since libxml2 2.13.

regression from 503af105
2025-10-10 00:19:22 +09:00
tokyo4j
c27d4955a4 desktop-entry: fix wrong description of sfdo-icon flags 2025-10-09 00:59:43 +02:00
Consolatis
7166efe7bf CI: also run on clients/ changes 2025-10-08 22:17:48 +02:00
Johan Malm
017152da52 build: use spaces instead of tab 2025-10-08 21:05:25 +01:00
Consolatis
814af0ae4d desktop-entry.c: don't demote error messages with LABWC_DEBUG_LIBSFDO
Also add additional logging to tell users how to get
more information about failures to load the icon theme.
2025-10-08 20:23:12 +01:00
Consolatis
cb0a4b875e desktop-entry.c: on detecting a broken icon theme, fall back to hicolor
Fixes: #3126
Reported-By: Kreevoz
2025-10-08 20:23:12 +01:00
tokyo4j
998ff9e7b5 osd-thumbnail: update default colors of selected window item
Some checks failed
labwc.github.io / notify (push) Has been cancelled
Previously, the default values of
`osd.window-switcher.style-thumbnail.item.active.{bg,border}.color`
were blue. But they caused the selected window title in the window
switcher to be unreadable due to duplicated colors of the text and
background with Openbox themes like Numix.

Instead, this commit updates them to follow other themes configurations.
The default border color of the selected window item is now
`osd.label.text.color` with 50% opacity and the background is
`osd.label.text.color` with 15% opacity.

For subpixel antialiasing to work, the background color is calculated by
manually blending `osd.label.text.color` and `osd.bg.color`, rather than
just updating the alpha with 50% or 15%.
2025-10-07 19:47:50 +01:00
Johan Malm
bed0be8a88 src/common/graphic-helpers.c: fix declaration/definition arg name difference
Some checks failed
labwc.github.io / notify (push) Has been cancelled
2025-10-01 21:18:44 +01:00
Johan Malm
0d0d1075cc include/common/scene-helpers: fix declaration/definition arg name difference 2025-10-01 21:18:44 +01:00
Johan Malm
4c1e66f6c8 include/common/buf.h: fix declaration/definition arg name difference 2025-10-01 21:18:44 +01:00
Johan Malm
389cef9c3b include/common/box.h: fix declaration/definition arg name difference 2025-10-01 21:18:44 +01:00
tokyo4j
e558d0d619 labnag: rename options for color 2025-10-01 20:10:33 +01:00
Johan Malm
c8581b3fed include/common/xml.h: fix declaration/definition arg name difference 2025-09-30 02:38:13 +02:00
Johan Malm
60d536304b Privatize view_append_children() 2025-09-29 20:22:46 +01:00
Johan Malm
9ec49144ac Privatize desktop_topmost_focusable_view() 2025-09-29 20:22:46 +01:00
Johan Malm
eb41c6a3b0 Privatize view_contains_window_type() 2025-09-29 20:22:46 +01:00
Johan Malm
2ea0f6fff4 Privatize output_manager_init() 2025-09-29 20:22:46 +01:00
Johan Malm
950c634cea Privatize xwayland_surface_from_view() 2025-09-29 20:22:46 +01:00
Johan Malm
286005e121 Privatize rcxml_parse_xml() 2025-09-29 20:22:46 +01:00
Johan Malm
040e25f38e Privatize private view_get_root() 2025-09-29 20:22:46 +01:00
Johan Malm
27f3097f8f build: add 'sections' option to show unused functions 2025-09-29 20:22:46 +01:00
tokyo4j
c5cd1f691d CI: use libwlroots-0.19-dev build-dep for Debian 2025-09-29 19:41:32 +01:00
tokyo4j
46bd1fef95 CI: add unit tests 2025-09-29 19:41:32 +01:00
tokyo4j
7e27f78662 test/xml: use xmlBufferContent()
xmlBuffer->content has been deprecated.
2025-09-29 19:41:32 +01:00
tokyo4j
1043a9becc test: fix build error in t/xml.c
38a1a9b broke `t/xml.c` due to `macros.h` requiring `wlr/version.h`.
This commit fixes it by adding `wlroots` as a direct dependency of the
test executables.
2025-09-29 19:41:32 +01:00
Johan Malm
94c980c6be action: fix UAF when using prompt during reconfigure
Reported-by: @jlindgren90

Fixes #3106
2025-09-26 21:25:34 +01:00
Johan Malm
c9030dcc5b CI: fix broken FreeBSD CI by setting -Dlibsfdo:b_ndebug=false
...because with with

    meson setup build -Dbuildtype=release -Db_ndebug=true \
        --werror --force-fallback-for=libsfdo

we get the following warning:

    In file included from ../subprojects/libsfdo/common/dirs.c:5:
    ../subprojects/libsfdo/include/common/membuild.h: In function ‘sfdo_membuild_validate’:
    ../subprojects/libsfdo/include/common/membuild.h:29:65: error: unused parameter ‘membuild’ [-Werror=unused-parameter]
       29 | static inline void sfdo_membuild_validate(struct sfdo_membuild *membuild) {

...because `sfdo_membuild_validate()` contains nothing but an `assert()`
and that therefore results in an `unused-parameter` warning with `NDEBUG`.

https://gitlab.freedesktop.org/vyivel/libsfdo/-/blob/main/include/common/membuild.h?ref_type=heads#L30
2025-09-26 19:06:21 +02:00
Johan Malm
26bd02d457 Add translate.h for HAVE_NLS includes/defines
...to shrink labwc.h footprint
2025-09-26 10:43:23 -04:00
Johan Malm
1692c47fa0 Remove unused function key_state_nr_pressed_keys() 2025-09-26 10:41:21 -04:00
Johan Malm
bdc8e1c546 Remove unused function lab_xml_get_node() 2025-09-26 10:41:21 -04:00
Johan Malm
ee87b4fc30 Remove unused function trim_last_field() 2025-09-26 10:41:21 -04:00
Johan Malm
34e52a40c7 Remove unused function node_layer_popup_from_node() 2025-09-26 10:41:21 -04:00
Johan Malm
139a5f0383 Remove unused function output_max_scale() 2025-09-26 10:41:21 -04:00
Johan Malm
0bf2678f9d Remove unused function scaled_font_buffer_set_max_width() 2025-09-26 10:41:21 -04:00
Johan Malm
6bbdc3c6dc Remove unused function menu_call_actions() 2025-09-26 10:41:21 -04:00
Johan Malm
7a5b7aa378 rcxml.h: minor tweaks to order of variables 2025-09-25 21:12:36 +01:00
Johan Malm
5fdebedcd9 labwc-config(5): document <promptCommand>
Some checks failed
labwc.github.io / notify (push) Has been cancelled
2025-09-24 20:13:51 +01:00
Johan Malm
5765586636 config: add <core><promptCommand>
...to enable configuration of the action prompt command.

Also set some better defaults for labnag.

The new default command is:

    labnag \
        --message '%m' \
        --button-dismiss '%n' \
        --button-dismiss '%y' \
        --background '%b' \
        --text '%t' \
        --border '%t' \
        --border-bottom '%t' \
        --button-background '%b' \
        --button-text '%t' \
        --border-bottom-size 1 \
        --button-border-size 3 \
        --timeout 0

...where the conversion specifiers are defined as follows:

    %m: the `<prompt>` message option
    %n: _("No")
    %y: _("Yes")
    %b: osd.bg.color
    %t: osd.label.text.color

This config options also enables the use of a different dialog client, for
example like this:

    <core>
      <promptCommand>zenity --question --text="%m"</promptCommand>
    </core>
2025-09-24 20:13:51 +01:00
Johan Malm
7028e65154 labnag: fix segfault caused by providing --timeout as long option 2025-09-24 20:13:51 +01:00
tokyo4j
ebce406b11 font: remove 4px padding on the right
Added `menu.items.padding.x` padding between item text and arrow instead.

Replaced `if (!string)` with `if (string_null_or_empty(string))` in
`font_extents()` just as a minor optimization.
2025-09-22 18:23:33 +01:00
Johan Malm
141f932efa README.md: remove high-level scope summary
...as it is very old and not relevant anymore.
2025-09-21 20:50:59 +09:00
tokyo4j
24f39e3a41 default-bindings.h: set combine="yes" for SnapToEdge keybinds
Some checks failed
labwc.github.io / notify (push) Has been cancelled
2025-09-19 16:23:23 +09:00
tokyo4j
2ac48116e1 action: allow SnapToEdge to combine two cardinal directions
This patch adds `combine` argument to (Toggle)SnapToEdge actions.
This allows to snap a window to e.g. up-left by running two actions:
- `<action name="SnapToEdge" direction="left" combine="yes" />`
- `<action name="SnapToEdge" direction="up" combine="yes" />`

Then running `<action name="SnapToEdge" direction="down" combine="yes" />`
snaps it to left again. This behavior is almost the same as KWin, except
that snapping a up-right-tiled window to right doesn't move it to the
right-adjacent output, but makes it right-tiled first.
2025-09-19 16:23:23 +09:00
tokyo4j
af6a0df231 view: remove an obsolete code in view_snap_to_edge()
We no longer need to call view_apply_tiled_geometry() there, since we now
clear view->tiled when dragging a tiled window since 9f51384.
2025-09-19 16:23:23 +09:00
Johan Malm
0db3b9309b libsfdo.wrap: update revision to v0.1.4 2025-09-18 23:42:53 +02:00