]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
3 months agoosd-classic: add theme options for selected window item
tokyo4j [Wed, 1 Oct 2025 05:25:43 +0000 (14:25 +0900)]
osd-classic: add theme options for selected window item

This commit adds new theme options:
- osd.window-switcher.style-classic.item.active.border.color
- osd.window-switcher.style-classic.item.active.bg.color

These theme options configures the border/background of selected window
item in the `classic` style window switcher. Their default values are
identical to `thumbnail` style window switcher, which means the default
border color is now `osd.label.text.color` with 50% opacity and the
default background color is now `osd.label.text.color` with 15% opacity.

3 months agoaction: simplify action_prompt_command()
tokyo4j [Wed, 1 Oct 2025 02:54:26 +0000 (11:54 +0900)]
action: simplify action_prompt_command()

3 months agobuild: fix build with libinput as a subproject
tokyo4j [Wed, 1 Oct 2025 12:09:17 +0000 (21:09 +0900)]
build: fix build with libinput as a subproject

Unfortunately, has_header_symbol() doesn't work with internal dependencies.

Ref: https://github.com/mesonbuild/meson/issues/13553

3 months agobuild: bump version to 0.9.2
Johan Malm [Fri, 10 Oct 2025 18:50:59 +0000 (19:50 +0100)]
build: bump version to 0.9.2

3 months agoview: fix unexpected view->tiled with SnapToEdge against centered view
tokyo4j [Fri, 10 Oct 2025 08:30:55 +0000 (17:30 +0900)]
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`.

3 months agoNEWS.md: update notes for 0.9.2
Johan Malm [Fri, 19 Sep 2025 19:47:56 +0000 (20:47 +0100)]
NEWS.md: update notes for 0.9.2

3 months agorcxml: move <maximizedDecoration> from <core> to <theme>
tokyo4j [Thu, 9 Oct 2025 12:24:44 +0000 (21:24 +0900)]
rcxml: move <maximizedDecoration> from <core> to <theme>

3 months agofix typo in comment
Tobias Bengfort [Thu, 9 Oct 2025 07:45:36 +0000 (09:45 +0200)]
fix typo in comment

3 months agofix double free for libxml2 < 2.13
Tobias Bengfort [Thu, 9 Oct 2025 07:39:59 +0000 (09:39 +0200)]
fix double free for libxml2 < 2.13

xmlAddChild() only unlinks the second argument since libxml2 2.13.

regression from 503af105

3 months agodesktop-entry: fix wrong description of sfdo-icon flags
tokyo4j [Wed, 8 Oct 2025 09:32:30 +0000 (18:32 +0900)]
desktop-entry: fix wrong description of sfdo-icon flags

3 months agoCI: also run on clients/ changes
Consolatis [Wed, 8 Oct 2025 20:10:24 +0000 (22:10 +0200)]
CI: also run on clients/ changes

3 months agobuild: use spaces instead of tab
Johan Malm [Wed, 8 Oct 2025 19:57:45 +0000 (20:57 +0100)]
build: use spaces instead of tab

3 months agodesktop-entry.c: don't demote error messages with LABWC_DEBUG_LIBSFDO
Consolatis [Wed, 8 Oct 2025 17:47:57 +0000 (19:47 +0200)]
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.

3 months agodesktop-entry.c: on detecting a broken icon theme, fall back to hicolor
Consolatis [Wed, 8 Oct 2025 16:50:18 +0000 (18:50 +0200)]
desktop-entry.c: on detecting a broken icon theme, fall back to hicolor

Fixes: #3126
Reported-By: Kreevoz
3 months agoosd-thumbnail: update default colors of selected window item
tokyo4j [Wed, 1 Oct 2025 19:06:48 +0000 (04:06 +0900)]
osd-thumbnail: update default colors of selected window item

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%.

3 months agosrc/common/graphic-helpers.c: fix declaration/definition arg name difference
Johan Malm [Wed, 1 Oct 2025 19:50:31 +0000 (20:50 +0100)]
src/common/graphic-helpers.c: fix declaration/definition arg name difference

3 months agoinclude/common/scene-helpers: fix declaration/definition arg name difference
Johan Malm [Wed, 1 Oct 2025 19:48:45 +0000 (20:48 +0100)]
include/common/scene-helpers: fix declaration/definition arg name difference

3 months agoinclude/common/buf.h: fix declaration/definition arg name difference
Johan Malm [Wed, 1 Oct 2025 19:48:15 +0000 (20:48 +0100)]
include/common/buf.h: fix declaration/definition arg name difference

3 months agoinclude/common/box.h: fix declaration/definition arg name difference
Johan Malm [Wed, 1 Oct 2025 19:47:33 +0000 (20:47 +0100)]
include/common/box.h: fix declaration/definition arg name difference

3 months agolabnag: rename options for color
tokyo4j [Wed, 1 Oct 2025 06:22:54 +0000 (15:22 +0900)]
labnag: rename options for color

3 months agoinclude/common/xml.h: fix declaration/definition arg name difference
Johan Malm [Mon, 29 Sep 2025 20:30:04 +0000 (21:30 +0100)]
include/common/xml.h: fix declaration/definition arg name difference

3 months agoPrivatize view_append_children()
Johan Malm [Fri, 26 Sep 2025 18:21:34 +0000 (19:21 +0100)]
Privatize view_append_children()

3 months agoPrivatize desktop_topmost_focusable_view()
Johan Malm [Fri, 26 Sep 2025 18:17:56 +0000 (19:17 +0100)]
Privatize desktop_topmost_focusable_view()

3 months agoPrivatize view_contains_window_type()
Johan Malm [Fri, 26 Sep 2025 18:17:27 +0000 (19:17 +0100)]
Privatize view_contains_window_type()

3 months agoPrivatize output_manager_init()
Johan Malm [Fri, 26 Sep 2025 18:16:01 +0000 (19:16 +0100)]
Privatize output_manager_init()

3 months agoPrivatize xwayland_surface_from_view()
Johan Malm [Fri, 26 Sep 2025 18:15:29 +0000 (19:15 +0100)]
Privatize xwayland_surface_from_view()

3 months agoPrivatize rcxml_parse_xml()
Johan Malm [Fri, 26 Sep 2025 18:14:30 +0000 (19:14 +0100)]
Privatize rcxml_parse_xml()

3 months agoPrivatize private view_get_root()
Johan Malm [Fri, 26 Sep 2025 16:46:20 +0000 (17:46 +0100)]
Privatize private view_get_root()

3 months agobuild: add 'sections' option to show unused functions
Johan Malm [Fri, 26 Sep 2025 16:47:47 +0000 (17:47 +0100)]
build: add 'sections' option to show unused functions

3 months agoCI: use libwlroots-0.19-dev build-dep for Debian
tokyo4j [Mon, 29 Sep 2025 08:07:43 +0000 (17:07 +0900)]
CI: use libwlroots-0.19-dev build-dep for Debian

3 months agoCI: add unit tests
tokyo4j [Mon, 29 Sep 2025 07:13:37 +0000 (16:13 +0900)]
CI: add unit tests

3 months agotest/xml: use xmlBufferContent()
tokyo4j [Mon, 29 Sep 2025 07:04:37 +0000 (16:04 +0900)]
test/xml: use xmlBufferContent()

xmlBuffer->content has been deprecated.

3 months agotest: fix build error in t/xml.c
tokyo4j [Mon, 29 Sep 2025 07:03:36 +0000 (16:03 +0900)]
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.

3 months agoaction: fix UAF when using prompt during reconfigure
Johan Malm [Fri, 26 Sep 2025 19:42:31 +0000 (20:42 +0100)]
action: fix UAF when using prompt during reconfigure

Reported-by: @jlindgren90
Fixes #3106

3 months agoCI: fix broken FreeBSD CI by setting -Dlibsfdo:b_ndebug=false
Johan Malm [Fri, 26 Sep 2025 16:52:13 +0000 (17:52 +0100)]
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

3 months agoAdd translate.h for HAVE_NLS includes/defines
Johan Malm [Wed, 24 Sep 2025 19:25:27 +0000 (20:25 +0100)]
Add translate.h for HAVE_NLS includes/defines

...to shrink labwc.h footprint

3 months agoRemove unused function key_state_nr_pressed_keys()
Johan Malm [Thu, 25 Sep 2025 18:38:13 +0000 (19:38 +0100)]
Remove unused function key_state_nr_pressed_keys()

3 months agoRemove unused function lab_xml_get_node()
Johan Malm [Thu, 25 Sep 2025 18:36:37 +0000 (19:36 +0100)]
Remove unused function lab_xml_get_node()

3 months agoRemove unused function trim_last_field()
Johan Malm [Thu, 25 Sep 2025 18:35:22 +0000 (19:35 +0100)]
Remove unused function trim_last_field()

3 months agoRemove unused function node_layer_popup_from_node()
Johan Malm [Thu, 25 Sep 2025 18:33:55 +0000 (19:33 +0100)]
Remove unused function node_layer_popup_from_node()

3 months agoRemove unused function output_max_scale()
Johan Malm [Thu, 25 Sep 2025 18:27:01 +0000 (19:27 +0100)]
Remove unused function output_max_scale()

3 months agoRemove unused function scaled_font_buffer_set_max_width()
Johan Malm [Thu, 25 Sep 2025 18:25:51 +0000 (19:25 +0100)]
Remove unused function scaled_font_buffer_set_max_width()

3 months agoRemove unused function menu_call_actions()
Johan Malm [Thu, 25 Sep 2025 18:24:52 +0000 (19:24 +0100)]
Remove unused function menu_call_actions()

3 months agorcxml.h: minor tweaks to order of variables
Johan Malm [Wed, 24 Sep 2025 19:16:37 +0000 (20:16 +0100)]
rcxml.h: minor tweaks to order of variables

3 months agolabwc-config(5): document <promptCommand>
Johan Malm [Tue, 23 Sep 2025 18:26:52 +0000 (19:26 +0100)]
labwc-config(5): document <promptCommand>

3 months agoconfig: add `<core><promptCommand>`
Johan Malm [Mon, 22 Sep 2025 17:32:42 +0000 (18:32 +0100)]
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>

3 months agolabnag: fix segfault caused by providing --timeout as long option
Johan Malm [Tue, 23 Sep 2025 18:27:45 +0000 (19:27 +0100)]
labnag: fix segfault caused by providing --timeout as long option

3 months agofont: remove 4px padding on the right
tokyo4j [Sun, 21 Sep 2025 11:40:49 +0000 (20:40 +0900)]
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.

4 months agoREADME.md: remove high-level scope summary
Johan Malm [Fri, 19 Sep 2025 19:50:03 +0000 (20:50 +0100)]
README.md: remove high-level scope summary

...as it is very old and not relevant anymore.

4 months agodefault-bindings.h: set combine="yes" for SnapToEdge keybinds
tokyo4j [Wed, 17 Sep 2025 07:25:32 +0000 (16:25 +0900)]
default-bindings.h: set combine="yes" for SnapToEdge keybinds

4 months agoaction: allow SnapToEdge to combine two cardinal directions
tokyo4j [Fri, 5 Sep 2025 03:14:52 +0000 (12:14 +0900)]
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.

4 months agoview: remove an obsolete code in view_snap_to_edge()
tokyo4j [Sun, 14 Sep 2025 18:54:40 +0000 (03:54 +0900)]
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.

4 months agolibsfdo.wrap: update revision to v0.1.4
Johan Malm [Thu, 18 Sep 2025 20:39:30 +0000 (21:39 +0100)]
libsfdo.wrap: update revision to v0.1.4

4 months agoREADME.md: remove yambar reference as discontinued
Johan Malm [Wed, 17 Sep 2025 20:12:08 +0000 (21:12 +0100)]
README.md: remove yambar reference as discontinued

4 months agoUpdate labwc-actions.5.scd
cunlem [Tue, 16 Sep 2025 18:48:20 +0000 (18:48 +0000)]
Update labwc-actions.5.scd

4 months agoNEWS.md: interim update
Johan Malm [Mon, 15 Sep 2025 18:31:05 +0000 (19:31 +0100)]
NEWS.md: interim update

4 months agoview: fix <query monitor="current|left|right" />
tokyo4j [Sun, 14 Sep 2025 18:31:56 +0000 (03:31 +0900)]
view: fix <query monitor="current|left|right" />

Before this commit, <else> branch was always executed with
monitor="current", monitor="left" or monitor="right" queries.

For example:

<action name="If">
  <query monitor="current" />
  <then>
    <action />
  </then>
  <else>
    <action />
  </else>
</action>

4 months agoclang-format: tweak to match existing code a little better
John Lindgren [Tue, 9 Sep 2025 00:34:27 +0000 (20:34 -0400)]
clang-format: tweak to match existing code a little better

"clang-format -i src/view.c" before:
  1 file changed, 204 insertions(+), 169 deletions(-)

"clang-format -i src/view.c" after:
  1 file changed, 181 insertions(+), 146 deletions(-)

4 months agorcxml: use const char* for string literals
John Lindgren [Tue, 9 Sep 2025 00:10:42 +0000 (20:10 -0400)]
rcxml: use const char* for string literals

4 months agoosd-thumbnail: put designated initializers in order
John Lindgren [Sun, 7 Sep 2025 03:31:38 +0000 (23:31 -0400)]
osd-thumbnail: put designated initializers in order

4 months agointeractive: add braces around case containing declaration
John Lindgren [Sun, 7 Sep 2025 03:31:00 +0000 (23:31 -0400)]
interactive: add braces around case containing declaration

4 months agorcxml: use fixed arrays for rc.title_buttons_*
John Lindgren [Tue, 9 Sep 2025 02:35:23 +0000 (22:35 -0400)]
rcxml: use fixed arrays for rc.title_buttons_*

These are just lists of enum lab_node_type, with a bounded size and
no middle-insertions/removals, so linked lists are overkill.

Also, the use of wl_list_for_each[_reverse] just to access the first or
last entry in the list (corner button) was weird.

4 months agoCONTRIBUTING.md: fix some typos, lots of Oxford commas
thatonecoder (formerly Coccocoa's Helper) [Thu, 11 Sep 2025 07:47:31 +0000 (08:47 +0100)]
CONTRIBUTING.md: fix some typos, lots of Oxford commas

The primary change is “Github”/“github” ⇾ “GitHub”, but there are plenty of others.

4 months agolabwc-config(5): add example for autoEnableOutputs
Johan Malm [Tue, 9 Sep 2025 20:21:04 +0000 (21:21 +0100)]
labwc-config(5): add example for autoEnableOutputs

...with inspiration from example in #3059 by @jlindgren90

4 months agodesktop: refactor get_cursor_context()
tokyo4j [Mon, 8 Sep 2025 17:56:37 +0000 (02:56 +0900)]
desktop: refactor get_cursor_context()

This patch should not change any behaviors.

This clarifies the semantics of cursor_context returned by
get_cursor_context() as I described in cursor.h; when cursor is on a
subsurface (e.g. xdg/x11/layer/session-lock), the returned ctx.surface
and ctx.node points to the subsurface rather than its parent.

4 months agodesktop: let get_cursor_context() return layer-popup subsurface
tokyo4j [Mon, 8 Sep 2025 17:53:31 +0000 (02:53 +0900)]
desktop: let get_cursor_context() return layer-popup subsurface

With this change, when a layer-popup has a subsurface and cursor is on
it, wl_pointer.enter/motion events are sent to the subsurface rather
than its parent layer-popup surface. I think this follows wayland spec
more closely.

Tested with my demo: https://github.com/tokyo4j/wayland-demo/tree/layer-popup

4 months agodesktop: don't use LAB_NODE_LAYER_SUBSURFACE node type
tokyo4j [Mon, 8 Sep 2025 17:51:33 +0000 (02:51 +0900)]
desktop: don't use LAB_NODE_LAYER_SUBSURFACE node type

Instead, set ctx.type = LAB_NODE_LAYER_SURFACE for both layer-surfaces
and layer-subsurfaces.

This patch preserves the existing behaviors:
- Pressing a subsurface of an on-demand layer-surface gives pointer
  focus to the subsurface, but gives keyboard focus to the parent
  layer-surface (related: a5fcbfaf).
- Pressing a subsurface of a layer-surface doesn't close a popup
  (related: a89bcc3c).

4 months agossd: attach LAB_NODE_SSD_ROOT to ssd->tree
tokyo4j [Sun, 7 Sep 2025 12:48:51 +0000 (21:48 +0900)]
ssd: attach LAB_NODE_SSD_ROOT to ssd->tree

This doesn't change any behaviors.

Attaching LAB_NODE_NONE node-descriptor to ssd->tree looks strange, this
patch uses new LAB_NODE_SSD_ROOT instead. The node-descriptor attached to
ssd->tree is needed for get_cursor_context() to detect cursor hovering on
borders/extents.

I also updated get_cursor_context() to make my intent clearer.

4 months agooutput: remove node descriptors
tokyo4j [Sun, 7 Sep 2025 12:47:08 +0000 (21:47 +0900)]
output: remove node descriptors

4 months agoscaled-buffer: remove *_from_node() functions
tokyo4j [Sun, 7 Sep 2025 12:45:29 +0000 (21:45 +0900)]
scaled-buffer: remove *_from_node() functions

4 months agodesktop.c: don't print errors when cursor is on resize-indicator
tokyo4j [Sun, 7 Sep 2025 13:10:27 +0000 (22:10 +0900)]
desktop.c: don't print errors when cursor is on resize-indicator

In f347a81, I thought there are only window contents and SSD under
`view->scene_tree` and forgot about the resize-indicator.

I also refactored the logic around it:
- Remove `ret.node->type == WLR_SCENE_NODE_BUFFER` check since it's
  already done by `lab_wlr_surface_from_node()`
- Eliminate duplicated call to `lab_wlr_surface_from_node()`

4 months agosrc/output.c: restore drm lease include
Consolatis [Sun, 7 Sep 2025 14:47:58 +0000 (16:47 +0200)]
src/output.c: restore drm lease include

Introduced in #3062.

Its usage is guarded by a wlroots version check
which prevented the CI to detect the issue.

When compiled with a wlroots version > 0.19.0
(like the chase 0.20 PR) the error shows up.

4 months agotree-wide: use forward declarations for wlr types
John Lindgren [Sun, 7 Sep 2025 00:06:32 +0000 (20:06 -0400)]
tree-wide: use forward declarations for wlr types

4 months agosrc: remove unused #includes (via include-what-you-use)
John Lindgren [Wed, 3 Sep 2025 03:19:38 +0000 (23:19 -0400)]
src: remove unused #includes (via include-what-you-use)

4 months agoinclude: reduce unnecessary #includes
John Lindgren [Wed, 3 Sep 2025 03:02:27 +0000 (23:02 -0400)]
include: reduce unnecessary #includes

4 months agoarray: use die_if_null() from common/mem.c
John Lindgren [Wed, 3 Sep 2025 04:00:01 +0000 (00:00 -0400)]
array: use die_if_null() from common/mem.c

4 months agoidle_manager: remove unused parameter and field
John Lindgren [Thu, 21 Aug 2025 04:26:27 +0000 (00:26 -0400)]
idle_manager: remove unused parameter and field

wlr_seat isn't used anywhere.

4 months agoTranslation updates from weblate
Weblate [Sat, 6 Sep 2025 04:27:30 +0000 (06:27 +0200)]
Translation updates from weblate

Co-authored-by: virtual-hand <handvirtual@tutamail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/pt_BR/
Translation: Labwc/labwc

4 months agossd: update comments referencing ssd_part/ssd_part_type
John Lindgren [Sat, 6 Sep 2025 18:04:21 +0000 (14:04 -0400)]
ssd: update comments referencing ssd_part/ssd_part_type

4 months agossd: unify struct ssd_part with struct node_descriptor
John Lindgren [Wed, 3 Sep 2025 09:32:44 +0000 (05:32 -0400)]
ssd: unify struct ssd_part with struct node_descriptor

struct ssd_part and struct node_descriptor seem to have essentially the
same purpose: tag a wlr_scene_node with some extra data indicating what
we're using it for.

Also, as with enum ssd_part_type (now lab_node_type), ssd_part is used
for several types of nodes that are not part of SSD.

So instead of the current chaining (node_descriptor -> ssd_part), let's
flatten/unify the two structs.

In detail:

- First, merge node_descriptor_type into lab_node_type.
- Add a separate view pointer in node_descriptor, since in the case of
  SSD buttons we need separate view and button data pointers.
- Rename ssd_part_button to simply ssd_button. It no longer contains
  an ssd_part as base.
- Add node_try_ssd_button_from_node() which replaces
  node_ssd_part_from_node() + button_try_from_ssd_part().
- Factor out ssd_button_free() to be called in node descriptor destroy.
- Finally, get_cursor_context() needs a little reorganization to handle
  the unified structs.

Overall, this simplifies the code a bit, and in my opinion makes it
easier to understand. No functional change intended.

4 months agossd: eliminate ssd_hover_state (addressing a FIXME)
John Lindgren [Wed, 3 Sep 2025 05:20:53 +0000 (01:20 -0400)]
ssd: eliminate ssd_hover_state (addressing a FIXME)

4 months agocommon: add node-type.c/h (renaming ssd_part_type to lab_node_type)
John Lindgren [Wed, 3 Sep 2025 09:08:52 +0000 (05:08 -0400)]
common: add node-type.c/h (renaming ssd_part_type to lab_node_type)

ssd_part_type contains several node types that are not actually part of
server-side decorations (ROOT, MENU, OSD, etc.)

Rename it accordingly and move it to a common location, along with some
related conversion/comparison functions.

4 months agotheme: fix spelling of LAB_BS_HOVERED
John Lindgren [Sat, 6 Sep 2025 15:43:48 +0000 (11:43 -0400)]
theme: fix spelling of LAB_BS_HOVERED

4 months agossd-titlebar: don't bind ssd_part to ssd->tree
tokyo4j [Sat, 6 Sep 2025 18:42:50 +0000 (03:42 +0900)]
ssd-titlebar: don't bind ssd_part to ssd->tree

Fixes up f347a81. This mistake didn't cause misbehaviors because the
ssd_part bound to ssd->tree is just a placeholder to let
get_cursor_context() call ssd_get_resizing_type() when the cursor is on
border/extents.

4 months agoview.c: remove cruft in view_apply_maximized_geometry()
tokyo4j [Thu, 4 Sep 2025 09:44:38 +0000 (18:44 +0900)]
view.c: remove cruft in view_apply_maximized_geometry()

4 months agodefault-bindings.h: focus & raise on border press
Johan Malm [Mon, 1 Sep 2025 19:56:51 +0000 (20:56 +0100)]
default-bindings.h: focus & raise on border press

...because it is probably what most people expect and it makes the
behavior consistent with that of Openbox.

Fixes: #3039
4 months agolabnag: s/nag/labnag/ in usage string
Johan Malm [Wed, 3 Sep 2025 19:30:22 +0000 (20:30 +0100)]
labnag: s/nag/labnag/ in usage string

Fixes #3051

4 months agoscaled-scene-buffer: restructure source files
tokyo4j [Tue, 2 Sep 2025 08:47:01 +0000 (17:47 +0900)]
scaled-scene-buffer: restructure source files

- Rename `scaled_scene_buffer` to `scaled_buffer`. This makes it clear
  that `scaled_{font,img,icon}_buffers` are implementations of it.
- Move the files from `src/common` to `src/scaled-buffer` as
  `scaled_icon_buffer` heavily depends on `server` and `view` etc.

4 months agomousebind: support `Border` context
tokyo4j [Mon, 1 Sep 2025 23:32:23 +0000 (08:32 +0900)]
mousebind: support `Border` context

This new context includes `Top`...`BRCorner` and makes it easier to modify
the mousebinds bound to them.

4 months agoNEWS.md: link from TOC to each section
Johan Malm [Mon, 1 Sep 2025 19:47:05 +0000 (20:47 +0100)]
NEWS.md: link from TOC to each section

4 months agointeractive: un-maximize only axes that are being resized
John Lindgren [Mon, 1 Sep 2025 16:07:52 +0000 (12:07 -0400)]
interactive: un-maximize only axes that are being resized

When resizing in only one axis (horizontal/vertical), there's no reason
to un-maximize the other axis.

Supporting logic was landed in the previous commit and in ebd39dfe0d1d
(which fixed the client-initiated resize case), so all that remains is
to make a small change in interactive_begin().

4 months agoview: expose view_set_maximized() instead of view_restore_to()
John Lindgren [Mon, 1 Sep 2025 15:49:24 +0000 (11:49 -0400)]
view: expose view_set_maximized() instead of view_restore_to()

view_restore_to() (which is just set_maximized() + view_move_resize())
hasn't aged well and doesn't line up with typical usage anymore:

 - it's missing view_set_untiled(), which has to be called separately
 - it always forces view_move_resize() even when that's not needed
 - it doesn't allow un-maximizing only one axis (see next commit)
 - the fullscreen check is unnecessary (already checked in callers)

Eliminate it and just expose view_set_maximized() instead.

No functional change intended in this commit.

4 months agoview: restore initially-maximized window position after unplug/plug
tokyo4j [Mon, 1 Sep 2025 08:52:06 +0000 (17:52 +0900)]
view: restore initially-maximized window position after unplug/plug

`update_last_layout_geometry()` stores `view->natural_geometry` in
`view->last_layout_geometry`, but it's empty for initially-maximized
windows, so their positions were not restored after outputs are
unplugged and plugged (also when VT switching in wlroots 0.19.0).

This commit sets the fallback natural geometry (at the center of the
output) so that initially-maximized windows reappears in the same output.

4 months agoview: let `view_set_fallback_natural_geometry()` return wlr_box
tokyo4j [Mon, 1 Sep 2025 08:04:41 +0000 (17:04 +0900)]
view: let `view_set_fallback_natural_geometry()` return wlr_box

4 months agoview: use fixed default window width
tokyo4j [Mon, 1 Sep 2025 08:29:24 +0000 (17:29 +0900)]
view: use fixed default window width

Now it's not very reasonable to determine the default window width based
on the titlebar geometry, as the titlebar can be shrunk to 1px.

Let's use the fixed value of 100px for simplification.

4 months agoview.c: remove outdated comment
tokyo4j [Mon, 1 Sep 2025 08:16:53 +0000 (17:16 +0900)]
view.c: remove outdated comment

Since a5d89a2, xdg-shell views can request very small window geometry.

4 months agooverlay: refactor
tokyo4j [Sat, 30 Aug 2025 19:41:08 +0000 (04:41 +0900)]
overlay: refactor

- Use a single `lab_scene_rect` for both overlay background and outlines,
  like I described in the TODO comment in ffd4005.
- Simplify the resource management by destroying the overlay tree when
  it's hidden. I think its overhead is pretty minimal.
- Share a single `lab_scene_rect` for both region/edge overlays.

4 months agooverlay.h: reduce included headers
tokyo4j [Sat, 30 Aug 2025 19:38:36 +0000 (04:38 +0900)]
overlay.h: reduce included headers

4 months agodocs/labnag.1.scd: fix missed escape
01micko [Sat, 30 Aug 2025 11:51:14 +0000 (21:51 +1000)]
docs/labnag.1.scd: fix missed escape

4 months agodocs/labnag.1.scd: add a labnag example
01micko [Sat, 30 Aug 2025 10:17:43 +0000 (20:17 +1000)]
docs/labnag.1.scd: add a labnag example