]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
17 months agoaction: add UnSnap action
Jens Peters [Sat, 21 Sep 2024 13:54:30 +0000 (15:54 +0200)]
action: add UnSnap action

Same untiling behavior as ToggleSnapToEdge/Region,
but unconditionally.

Co-authored-by: tokyo4j <hrak1529@gmail.com>
17 months agoaction: add ToggleSnapToEdge/Region actions
Jens Peters [Sat, 21 Sep 2024 13:53:05 +0000 (15:53 +0200)]
action: add ToggleSnapToEdge/Region actions

Behaves identical like SnapToEdge and SnapToRegion, but
untiles the window when already being tiled to the given
region or direction.

Co-authored-by: tokyo4j <hrak1529@gmail.com>
17 months agoview: expose view_apply_natural_geometry()
Jens Peters [Sat, 21 Sep 2024 13:51:37 +0000 (15:51 +0200)]
view: expose view_apply_natural_geometry()

Co-authored-by: tokyo4j <hrak1529@gmail.com>
17 months agoci: disable debian build checks until dependencies can be met
Johan Malm [Tue, 24 Sep 2024 19:22:25 +0000 (20:22 +0100)]
ci: disable debian build checks until dependencies can be met

17 months agotheme: fix incorrect default for <titlebar><showTitle>
Johan Malm [Tue, 24 Sep 2024 18:51:58 +0000 (19:51 +0100)]
theme: fix incorrect default for <titlebar><showTitle>

17 months agoTranslation updates from weblate
Weblate [Tue, 24 Sep 2024 08:01:21 +0000 (10:01 +0200)]
Translation updates from weblate

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/uk/
Translation: Labwc/labwc

17 months agoDon't detect edge-resizes in configure timeout
David Turner [Mon, 23 Sep 2024 15:17:22 +0000 (16:17 +0100)]
Don't detect edge-resizes in configure timeout

If a client times out responding to a configure request then the
handle_configure_timeout() callback is run.  This cleans up the pending
state and moves the view to the pending location, but keeps the current
size. The idea is to stop slow applications causing too much lag when
the user manipulates the window.  This callback used
view_impl_apply_geometry() to actually apply the changes.

view_impl_apply_geometry() contains some heuristics to detect if we're
resizing a window from the top, left, or top-left, and if so to do the
expected behaviour of keeping the window's bottom/right corner in the
same place.  However, that code was erroneously triggering in the case
when the user requests to change a window from maximized to fullscreen
but the client times out on the configure request.
handle_configure_timeout() decides to enact the movement of the window
but keep its size at the old size and tells view_impl_apply_geometry()
to do that.

The current view position and size is 0,64 1920x1016, the pending
position/size is 0,0 1920x1080, and the last committed size is
1920x1016.  Looking at the current and pending position and size, the
height changes while the bottom edge stays in the same place so this
looks like a top-edge-resize and view_impl_apply_geometry() decides to
keep the window's bottom edge in the same place while setting the
position according to the last-committed size.  This results in the
window staying at position 0,64 size 1920x1016 despite being marked as
fullscreen.

My solution to this is just to change handle_configure_timeout() to
directly change the view's position and call view_moved() if necessary.
The idea of handle_configure_timeout() is to action the window movement
now while discarding the size change, and let the size change take place
later on when the client catches up.  The logic of
view_impl_apply_geometry() doesn't make sense in this case so just avoid
it entirely.

Fixes #1922

17 months agoci: use -Wno-expansion-to-defined to avoid Arch CI error
Johan Malm [Mon, 23 Sep 2024 21:14:22 +0000 (22:14 +0100)]
ci: use -Wno-expansion-to-defined to avoid Arch CI error

...with this warning message:

[100/161] Compiling C object labwc.p/src_button_button-svg.c.o
FAILED: labwc.p/src_button_button-svg.c.o
gcc -Ilabwc.p -I. -I.. -Iinclude -I../include -I/usr/include/wlroots-0.18 -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/lib/pkgconfig/../../include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O0 -g -DWLR_USE_UNSTABLE -Wundef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wstrict-prototypes -Wimplicit-fallthrough=2 -Wendif-labels -Wstrict-aliasing=2 -Woverflow -Wmissing-prototypes -Walloca -Wunused-macros -Wno-unused-parameter '-DLABWC_VERSION="0.8.0"' '-DGETTEXT_PACKAGE="labwc"' '-DLOCALEDIR="/usr/local/share/locale"' -pthread -MD -MQ labwc.p/src_button_button-svg.c.o -MF labwc.p/src_button_button-svg.c.o.d -o labwc.p/src_button_button-svg.c.o -c ../src/button/button-svg.c
In file included from ../src/button/button-svg.c:7:
/usr/lib/pkgconfig/../../include/librsvg-2.0/librsvg/rsvg.h:1331:1: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
 1331 | #if LIBRSVG_CHECK_FEATURE(PIXBUF)
      | ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

17 months agoTranslation updates from weblate
Weblate [Mon, 23 Sep 2024 20:01:21 +0000 (22:01 +0200)]
Translation updates from weblate

Co-authored-by: Abdullah Albaroty <albaroty@gmail.com>
Co-authored-by: Priit Jõerüüt <lxqtwlate@joeruut.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ar/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/et/
Translation: Labwc/labwc

17 months agotheme: finish titleLayout implementation (#2150)
Johan Malm [Mon, 23 Sep 2024 18:17:12 +0000 (19:17 +0100)]
theme: finish titleLayout implementation (#2150)

Change Openbox style WLIMC syntax to `menu:iconify,max,close` as was
agreed when PR #2088 was merged.

    <titlebar>
      <layout>menu:iconify,max,close</layout>
      <showTitle>yes|on</showTitle>
    </titlebar>

Ref:
- https://github.com/labwc/labwc/pull/2088#issuecomment-2295730704

17 months agoTranslation updates from weblate
Weblate [Sat, 21 Sep 2024 20:01:21 +0000 (22:01 +0200)]
Translation updates from weblate

Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Hugo Carvalho <hugokarvalho@hotmail.com>
Co-authored-by: Jan Rolski <wbcwknvstb@proton.me>
Co-authored-by: Standreas <standreas@riseup.net>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/it/
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/pt/
Translation: Labwc/labwc

17 months agoTranslation updates from weblate
Weblate [Thu, 19 Sep 2024 20:01:23 +0000 (22:01 +0200)]
Translation updates from weblate

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/
Translation: Labwc/labwc

17 months agoxdg: handle show_window_menu requests
tokyo4j [Mon, 16 Sep 2024 15:32:02 +0000 (00:32 +0900)]
xdg: handle show_window_menu requests

17 months agoxdg: don't always adjust the window size before configure
tokyo4j [Sat, 21 Sep 2024 07:16:35 +0000 (16:16 +0900)]
xdg: don't always adjust the window size before configure

This fixes the small flicker when the client initially submits a window
size smaller than the minimum value.

17 months agoRefactor the logic of placing client-menu with ShowMenu action
tokyo4j [Fri, 20 Sep 2024 16:11:27 +0000 (01:11 +0900)]
Refactor the logic of placing client-menu with ShowMenu action

Before this commit, we assumed `ShowMenu` action is not bound to any
buttons other than window menu button and always place the client-menu
under the window-menu button when atCursor="no". Also, it was going to be
difficult to distinguish whether the action is executed from the window
menu button or the window icon, which will be added soon.

This commit fixes it to open the menu under the actually-clicked button by
passing `cursor_context` to `actions_run()`, with some refactoring:
- `seat->pressed.resize_edges` is removed and it's calculated from the
  cursor position and `seat->pressed.type` just before running Resize
  action. This slightly changes the existing logic to determine the
  resizing edges with Alt-Right + Drag mousebinding, but
  `seat->pressed.type` is still stored on button press so it doesn't bring
  back the issue #543.
- `seat->pressed.toplevel` is removed and `get_toplevel()` in
  `update_pressed_surface()` may be called more often, but its overhead
  will be negligible.

17 months agodocs: fix documentation of "atCursor" for dynamic titlebar layout
tokyo4j [Sat, 21 Sep 2024 11:12:00 +0000 (20:12 +0900)]
docs: fix documentation of "atCursor" for dynamic titlebar layout

17 months agodocs/rc.xml.all: add missing atCursor="no"
tokyo4j [Mon, 26 Aug 2024 09:29:49 +0000 (18:29 +0900)]
docs/rc.xml.all: add missing atCursor="no"

17 months agoclient list combines fix empty title
Droc [Thu, 19 Sep 2024 19:53:12 +0000 (14:53 -0500)]
client list combines fix empty title

this adds a check for title being null or empty as well as
existence of toplevel.handle

17 months agolabwc.pot: update translation template for 71b2b5a
01micko [Thu, 19 Sep 2024 11:41:35 +0000 (21:41 +1000)]
labwc.pot: update translation template for 71b2b5a

fixes #2157

17 months agoclient send to menu
Droc [Thu, 19 Sep 2024 00:01:28 +0000 (19:01 -0500)]
client send to menu

Shows all workspaces that current view can be sent to.
Works best when added to Client menu.

<menu id="client-send-to-menu" label="Send to..." />

Menu uses ">" and "<"  to highlight the current workspace

17 months agoclient list combined menu examples
Droc [Wed, 18 Sep 2024 21:50:01 +0000 (16:50 -0500)]
client list combined menu examples

17 months agoclient list combined menu fix
Droc [Wed, 18 Sep 2024 17:08:10 +0000 (12:08 -0500)]
client list combined menu fix

We don't know if the client-list-combined-menu is standalone
ie. triggered by a keybind or a submenu of another menu.
So we update client-list-combined-menu every time ShowMenu is called.

17 months agomenu: support client-list-combined-menu
Droc [Tue, 17 Sep 2024 11:52:10 +0000 (06:52 -0500)]
menu: support client-list-combined-menu

...showing windows across all workspaces.

<action name="ShowMenu" menu="client-list-combined-menu"/>

17 months agoNEWS.md: interim update
Johan Malm [Thu, 12 Sep 2024 20:14:10 +0000 (21:14 +0100)]
NEWS.md: interim update

17 months agoaction: open the client menu underneath the window menu button
Jens Peters [Sun, 15 Sep 2024 20:29:05 +0000 (22:29 +0200)]
action: open the client menu underneath the window menu button

It looks slightly awkward when the client menu shows up
in the left corner of the view and the window menu button
is configured to be on the right side.

17 months agotheme: round the hover effect along the window border
tokyo4j [Sun, 15 Sep 2024 15:16:30 +0000 (00:16 +0900)]
theme: round the hover effect along the window border

17 months agotheme: compensate the hover corner radius with padding
Jens Peters [Wed, 11 Sep 2024 15:52:26 +0000 (17:52 +0200)]
theme: compensate the hover corner radius with padding

When padding.width is set, the corner radius of the rectangle
hover effect can be smaller since there is more space available.

17 months agotheme: add circle button hover effect (#2127)
Jens Peters [Mon, 9 Sep 2024 15:44:03 +0000 (17:44 +0200)]
theme: add circle button hover effect (#2127)

17 months agotheme: ensure positive values (#2127)
Jens Peters [Tue, 10 Sep 2024 19:15:28 +0000 (21:15 +0200)]
theme: ensure positive values (#2127)

Clamp invalid configuration values to zero.

17 months agotheme: add button padding and spacing (#2127)
Jens Peters [Mon, 9 Sep 2024 15:43:38 +0000 (17:43 +0200)]
theme: add button padding and spacing (#2127)

While at it, separate corner width from button
width. Both are independed and having them
separately improves readability.

18 months agoAdd position arguments for menus
Droc [Thu, 5 Sep 2024 12:52:23 +0000 (07:52 -0500)]
Add position arguments for menus

...utilizing x,y coordinates where values can be a number, a negative
number, a percentage or "center".

- (0,0) is top left corner
- (-0,-0) is bottom right corner
- % is percentage of width and/or height
- 'center' centers the menu vertically and/or horizontally

    <action name="ShowMenu">
      <menu>root-menu</menu>
      <position>
        <x>0</x>
        <y>0</y>
      </position>
    </action>

Note: both x and y values must be supplied for positioning to work.

18 months agoTranslation updates from weblate
Weblate [Sat, 24 Aug 2024 20:01:18 +0000 (22:01 +0200)]
Translation updates from weblate

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: daniel <punished.haddock@proton.me>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/pt_BR/
Translation: Labwc/labwc

18 months agossd: allow ssd to be smaller than minimal size by hiding buttons
tokyo4j [Sun, 25 Aug 2024 07:33:41 +0000 (16:33 +0900)]
ssd: allow ssd to be smaller than minimal size by hiding buttons

This fixes the ugly look of SSD for tiny windows (e.g. "xterm -geometry
1x1") due to the early return in `ssd_update_geometry()`. Now SSDs are
rendered correctly for those windows by hiding some buttons when the
window width is smaller than the total width of buttons. Additionally for
windows smaller than (button width)*2, the corners are un-rounded so a
small titlebar can be rendered with a scene-rect.

18 months agoRevert "src/interactive.c: don't unshade when view is un-tiled by dragging"
Andrew J. Hesford [Tue, 27 Aug 2024 14:10:53 +0000 (10:10 -0400)]
Revert "src/interactive.c: don't unshade when view is un-tiled by dragging"

When labwc un-tiles views, it generally changes their size, which sends
a configure request to the client. However, because the view has been
disabled in the wlroots scene, it will not receive and process the
configure when labwc expects. Instead, the handling will be deferred
until the user unshades the view at some arbitrary time in the future,
resulting in labwc registering complains like

    [../src/xdg.c:239] client did not respond to configure request in 100 ms

Furthermore, the reconfigure will still generally produce flicker (as
the view opens in its tiled size and then jumps to its natural
geometry). Because skipping the unshade might cause client problems and
doesn't eliminate the problem it sought to resolve, let's revert this.

This reverts commit 2e19bd4d5b3c67c27d13be24d41a0ea9ba2f1626.

18 months agointeractive: allow moving horizontally/vertically maximized window
tokyo4j [Wed, 7 Aug 2024 00:17:25 +0000 (09:17 +0900)]
interactive: allow moving horizontally/vertically maximized window

Applies drag resistance unidirectionally for horizontally/vertically
maximized windows, allowing them to be dragged without being untiled
immediately. When the distance of cursor movement orthogonal to the
maximized direction exceeds <resistance><unMaximizeThreshold>.

While dragging a horizontally/vertically maximized window, edge/region
snapping is disabled to prevent unintentional snapping and overlays.

This commit also includes some refactoring to simplify the logic.

18 months agosrc/interactive.c: don't unshade when view is un-tiled by dragging
tokyo4j [Wed, 7 Aug 2024 03:45:23 +0000 (12:45 +0900)]
src/interactive.c: don't unshade when view is un-tiled by dragging

Unshading a maximized/tiled window at the start of interactive move
doesn't seem to be useful and caused flicker.

18 months agoREADME.md: update config files to six
micko [Mon, 26 Aug 2024 00:16:43 +0000 (10:16 +1000)]
README.md: update config files to six

18 months agodocs: add description for new theme buttons 'shade' and 'desk'
01micko [Sun, 25 Aug 2024 04:47:00 +0000 (14:47 +1000)]
docs: add description for new theme buttons 'shade' and 'desk'

18 months agoaction: rename "omnipresent" button options for Openbox compatibility
Andrew J. Hesford [Sun, 25 Aug 2024 04:00:24 +0000 (00:00 -0400)]
action: rename "omnipresent" button options for Openbox compatibility

- Mouse context "Omnipresent" -> "AllDesktops"
- Theme elements "window.*.button.omnipresent" -> "window.*.button.desk"
- Update documentation accordingly

18 months agoaction: make "FocusOutput" behave like "MoveToOutput"
Orfeas [Wed, 21 Aug 2024 04:38:44 +0000 (07:38 +0300)]
action: make "FocusOutput" behave like "MoveToOutput"

18 months agoFix typo in rc.xml.all
Standreas [Sat, 24 Aug 2024 13:42:10 +0000 (15:42 +0200)]
Fix typo in rc.xml.all

18 months agossd: add optional omnipresent button
Andrew J. Hesford [Fri, 23 Aug 2024 16:45:14 +0000 (12:45 -0400)]
ssd: add optional omnipresent button

18 months agossd: add optional shade button
Andrew J. Hesford [Thu, 22 Aug 2024 20:27:24 +0000 (16:27 -0400)]
ssd: add optional shade button

18 months agossd: fix incorrect cursor shape on titlebar corner without buttons
tokyo4j [Fri, 23 Aug 2024 04:05:13 +0000 (13:05 +0900)]
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}.

18 months agocommon/buf.c: use 0 directly in vsnprintf()
Consolatis [Fri, 23 Aug 2024 18:09:47 +0000 (20:09 +0200)]
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)
```

18 months agoinput: move <scrollFactor> to <libinput> section
tokyo4j [Thu, 8 Aug 2024 08:29:43 +0000 (17:29 +0900)]
input: move <scrollFactor> to <libinput> section

This allows per-device configuration of scroll factor (e.g. setting
different scroll factors for mice and touchpads).

18 months agoMerge pull request #2088 from xi/titlelayout
Johan Malm [Wed, 21 Aug 2024 18:20:34 +0000 (19:20 +0100)]
Merge pull request #2088 from xi/titlelayout

theme: implement titleLayout

18 months agomenu: add title theme options (#2097)
droc12345 [Wed, 21 Aug 2024 17:27:07 +0000 (12:27 -0500)]
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>
```

18 months agobuf: add buf_add_fmt()
Johan Malm [Mon, 19 Aug 2024 20:22:50 +0000 (21:22 +0100)]
buf: add buf_add_fmt()

18 months agorefactor ssd_titlebar_create
Tobias Bengfort [Sun, 18 Aug 2024 08:20:24 +0000 (10:20 +0200)]
refactor ssd_titlebar_create

18 months agossd: apply title layout
Tobias Bengfort [Sun, 18 Aug 2024 08:49:18 +0000 (10:49 +0200)]
ssd: apply title layout

18 months agossd: add titleLayout setting
Tobias Bengfort [Sat, 17 Aug 2024 12:45:25 +0000 (14:45 +0200)]
ssd: add titleLayout setting

18 months agoaction: add Enable/DisableTabletMouseEmulation
Jens Peters [Sun, 18 Aug 2024 14:09:39 +0000 (16:09 +0200)]
action: add Enable/DisableTabletMouseEmulation

Useful for window rules.

18 months agoscaled-font-buffer.c: initialize `buffer` to avoid bug waiting to happen
Johan Malm [Sat, 17 Aug 2024 12:41:10 +0000 (13:41 +0100)]
scaled-font-buffer.c: initialize `buffer` to avoid bug waiting to happen

18 months agomenu: use theme->menu_item_height instead of menu->item_height
Johan Malm [Thu, 15 Aug 2024 19:54:49 +0000 (20:54 +0100)]
menu: use theme->menu_item_height instead of menu->item_height

...and set it in theme.c post_processing()

18 months agomenu: support titles
Johan Malm [Thu, 9 May 2024 20:20:15 +0000 (21:20 +0100)]
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

18 months agoAdd unit test for common/buf.c
Johan Malm [Sat, 23 Sep 2023 14:07:25 +0000 (15:07 +0100)]
Add unit test for common/buf.c

18 months agosrc/menu: prevent delayed pipe menu response on item destroy (#2094)
Consolatis [Tue, 20 Aug 2024 16:09:17 +0000 (18:09 +0200)]
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.

18 months agoTranslation updates from weblate
Weblate [Sun, 18 Aug 2024 20:01:17 +0000 (22:01 +0200)]
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

18 months agoTranslation updates from weblate
Weblate [Sat, 17 Aug 2024 20:31:07 +0000 (22:31 +0200)]
Translation updates from weblate

Co-authored-by: Peter Jespersen <flywheel@illogical.dk>
18 months agossd: do not draw background for individual buttons
Tobias Bengfort [Sat, 17 Aug 2024 12:46:35 +0000 (14:46 +0200)]
ssd: do not draw background for individual buttons

18 months agooutput: set 'labwc' as app_id and title for nested outputs
Consolatis [Wed, 7 Aug 2024 21:28:30 +0000 (23:28 +0200)]
output: set 'labwc' as app_id and title for nested outputs

18 months agoxwayland: remove dissociate work-around
Johan Malm [Mon, 12 Aug 2024 21:07:53 +0000 (22:07 +0100)]
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.

18 months agoxdg: destroy foreign toplevel handle on unmap
tokyo4j [Tue, 13 Aug 2024 01:02:46 +0000 (10:02 +0900)]
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.

18 months agoxwayland: sync foreign-toplevel and associated outputs on re-map
tokyo4j [Tue, 13 Aug 2024 01:01:49 +0000 (10:01 +0900)]
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).

18 months agobuild: bump version to 0.8.0
Johan Malm [Fri, 16 Aug 2024 15:38:54 +0000 (16:38 +0100)]
build: bump version to 0.8.0

18 months agoNEWS.md: update notes for 0.8.0
Johan Malm [Thu, 15 Aug 2024 20:16:48 +0000 (21:16 +0100)]
NEWS.md: update notes for 0.8.0

18 months agoscene-helpers: use pending_commit_damage, chases wlr!4253
Consolatis [Wed, 14 Aug 2024 18:17:50 +0000 (20:17 +0200)]
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

18 months agoinput: ensure that our own tablet structs are created
Jens Peters [Sat, 10 Aug 2024 05:05:05 +0000 (07:05 +0200)]
input: ensure that our own tablet structs are created

18 months agoinput: move cursor event listeners from tablet to seat
Jens Peters [Fri, 9 Aug 2024 07:25:00 +0000 (09:25 +0200)]
input: move cursor event listeners from tablet to seat

Otherwise we would subscribe multiple times to the
same event when having multiple tablets.

18 months agoinput: use CONNECT_SIGNAL macro
Jens Peters [Fri, 9 Aug 2024 07:22:28 +0000 (09:22 +0200)]
input: use CONNECT_SIGNAL macro

18 months agoxdg: fix error when launching windowed Chromium
tokyo4j [Sun, 21 Jul 2024 08:09:17 +0000 (17:09 +0900)]
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".

18 months agoxdg-activation: temporarily disable source surface verification
tokyo4j [Fri, 9 Aug 2024 06:56:26 +0000 (15:56 +0900)]
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.

18 months agokeyboard: fix bug with empty XKB_DEFAULT_LAYOUT
Johan Malm [Thu, 8 Aug 2024 19:14:23 +0000 (20:14 +0100)]
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

18 months agoinput: apply tablet rotation before area transformation
Jens Peters [Thu, 8 Aug 2024 18:01:37 +0000 (20:01 +0200)]
input: apply tablet rotation before area transformation

This makes the behavior consistent with auto-rotation
as a result of output mapping.

18 months agodocs: clarify tablet rotation for mapped outputs
Jens Peters [Thu, 8 Aug 2024 16:09:07 +0000 (18:09 +0200)]
docs: clarify tablet rotation for mapped outputs

18 months agoinput: subscribe to tablet tool events from cursor
Jens Peters [Thu, 8 Aug 2024 15:46:20 +0000 (17:46 +0200)]
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.

18 months agoRename <snapping><dragResistance> to <resistance><unSnapThreshold>
tokyo4j [Thu, 8 Aug 2024 00:19:52 +0000 (09:19 +0900)]
Rename <snapping><dragResistance> to <resistance><unSnapThreshold>

As we already have <resistance><{screen,window}EdgeStrength>,
<resistance> will be a better place for this setting.

18 months agoNEWS.md: interim update
Johan Malm [Wed, 7 Aug 2024 20:01:30 +0000 (21:01 +0100)]
NEWS.md: interim update

19 months agotearing: add fullscreen options (#1941)
Jens Peters [Tue, 6 Aug 2024 20:23:10 +0000 (22:23 +0200)]
tearing: add fullscreen options (#1941)

Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
19 months agolabwc-config(5): minor refactor to fix pandoc rendering
Johan Malm [Tue, 6 Aug 2024 18:49:44 +0000 (19:49 +0100)]
labwc-config(5): minor refactor to fix pandoc rendering

19 months agokeybind: implement allowWhenLocked
Tobias Bengfort [Fri, 2 Aug 2024 12:08:19 +0000 (14:08 +0200)]
keybind: implement allowWhenLocked

fixes #2034

see https://github.com/swaywm/sway/blob/bc258a3be2f946c1c93bcbe40735b2db068e0ea8/sway/sway.5.scd?plain=1#L409

19 months agodocs: integrate onRelease into keybind
Tobias Bengfort [Fri, 2 Aug 2024 12:05:18 +0000 (14:05 +0200)]
docs: integrate onRelease into keybind

19 months agoview: stay fullscreen when view's output is disconnected
John Lindgren [Fri, 2 Aug 2024 02:15:27 +0000 (22:15 -0400)]
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
19 months agoCI: Install libwlroots-0.18-dev for the Debian runner
Consolatis [Tue, 6 Aug 2024 13:18:00 +0000 (15:18 +0200)]
CI: Install libwlroots-0.18-dev for the Debian runner

19 months agoxdg: account for drag resistance in do_late_positioning()
John Lindgren [Sat, 3 Aug 2024 00:18:21 +0000 (20:18 -0400)]
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.

19 months agoCI: increase speed of codestyle check
Consolatis [Sat, 3 Aug 2024 03:30:02 +0000 (05:30 +0200)]
CI: increase speed of codestyle check

by running up to nproc ones in parallel

19 months agoAdd resistance when dragging tiled windows
tokyo4j [Sat, 20 Jul 2024 07:58:39 +0000 (16:58 +0900)]
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.

19 months agomultirect: remove destroy listener before freeing
Consolatis [Wed, 24 Jul 2024 16:09:53 +0000 (18:09 +0200)]
multirect: remove destroy listener before freeing

Detected by `-Db_sanitize=address,undefined` for libwayland

19 months agoNEWS.md: update for 0.7.4
Johan Malm [Fri, 19 Jul 2024 20:59:13 +0000 (21:59 +0100)]
NEWS.md: update for 0.7.4

19 months agosrc/xdg-popup.c: take into account CSD borders for unconstraining
tokyo4j [Mon, 22 Jul 2024 07:20:17 +0000 (16:20 +0900)]
src/xdg-popup.c: take into account CSD borders for unconstraining

wlr_xdg_popup_unconstrain_from_box() takes a constraint box relative to
toplevel surface, not window.

19 months agosrc/xdg-popup.c: choose output depending on xdg-positioner
tokyo4j [Sat, 20 Jul 2024 17:33:51 +0000 (02:33 +0900)]
src/xdg-popup.c: choose output depending on xdg-positioner

wlr_popup->current.geometry.{x,y} are usually zero on initial commit, so
xdg-popups were always unconstrained against the output which contains
the top-left of the parent toplevel.

This commit changes xdg-popups to be unconstrained against the output
which contains the top-left of preliminary popup geometry designated by
xdg-positioner given as an argument of "get_popup" or "reposition"
requests.

19 months agolayer-shell: stop sending configure events on surface creation
tokyo4j [Tue, 23 Jul 2024 10:09:48 +0000 (19:09 +0900)]
layer-shell: stop sending configure events on surface creation

With wlroots 0.18, layer-shell's new_surface event is emitted on
zwlr_layer_shell_v1.get_layer_surface request rather than the first
commit. This change layer-shell clients like fuzzel to flicker on launch
because labwc was sending a configure event with fullscreen geometry due
to the absence of geometry hints on get_layer_surface requests.

This commit removes the code that updates the usable area from
new_surface handler, preventing unintended configure events with
fullscreen geometry.

19 months agobackend/drm: Implement support for renderer loss recovery
Christopher Snowhill [Thu, 18 Jul 2024 00:13:51 +0000 (17:13 -0700)]
backend/drm: Implement support for renderer loss recovery

This implementation is nearly identical to Sway's, except that
it also reloads the configuration, to spur on reloading the
server-side decorations.

v2: Fix style.
v3: Add a reset to the magnifier.
v4: Oops, restructure reset handler a bit.
v5: Commit the magnifier reset immediately, before freeing the
    lost allocator and renderer.
v6: Also check for failed render pass, which may return NULL.
v7: Add a second NULL test, just in case.

19 months agosrc/ssd/ssd.c: fix incorrect condition in ssd_part_contains()
tokyo4j [Tue, 23 Jul 2024 08:52:42 +0000 (17:52 +0900)]
src/ssd/ssd.c: fix incorrect condition in ssd_part_contains()

19 months agoxdg: remove useless view_set_ssd_mode() in xdg_toplevel_new()
John Lindgren [Sat, 20 Jul 2024 02:10:24 +0000 (22:10 -0400)]
xdg: remove useless view_set_ssd_mode() in xdg_toplevel_new()

The desired SSD mode is not known at this point. When it is known,
kde-deco/xdg-deco will call view_set_ssd_mode() themselves.

19 months agoxdg: update initial maximize logic for wlroots 0.18
John Lindgren [Fri, 19 Jul 2024 23:22:56 +0000 (19:22 -0400)]
xdg: update initial maximize logic for wlroots 0.18

The initial configure event is now sent explicitly by labwc rather
than by wlroots. We need to move the maximize/fullscreen logic to
the initial commit handling accordingly.

Updates #1956, fixes #1994, replaces #1995.

19 months agoedges.c: fix flicker of snapped windows in nested session
tokyo4j [Tue, 23 Apr 2024 17:01:07 +0000 (02:01 +0900)]
edges.c: fix flicker of snapped windows in nested session

Fixes: #1621
19 months agooutput: allow tearing with atomic mode setting
Christopher Snowhill [Thu, 18 Jul 2024 00:10:04 +0000 (17:10 -0700)]
output: allow tearing with atomic mode setting

Additionally, track errors and abandon the tearing allowance when it
cannot be set for two-seconds' worth of consecutive frames.

19 months agoxwayland: support xinitrc scripts to configure server on launch (#1963)
Andrew J. Hesford [Sat, 20 Jul 2024 08:40:11 +0000 (04:40 -0400)]
xwayland: support xinitrc scripts to configure server on launch (#1963)