Commit graph

2805 commits

Author SHA1 Message Date
tokyo4j
720ae1fc87 theme: reorder theme entries in documentation and codebase 2024-11-12 17:25:39 +00:00
tokyo4j
eaf11face6 server: release all the resources on exit
Release all the resources including wlr_allocator, wlr_renderer,
wlr_backend and wlr_scene. This makes it a lot easier to detect memory
leaks with ASAN.

On wlroots side, the commit ce615a44 needs to be reverted to detect memory
leaks with EGL renderer.
2024-11-12 16:21:06 +09:00
tokyo4j
71629741d6 server: release server->ssd_hover_state on exit 2024-11-12 16:21:06 +09:00
tokyo4j
fc66caf5d8 cosmic-workspace: destroy manager when wl_display is destroyed 2024-11-12 16:21:06 +09:00
tokyo4j
102bcc5013 seat: destroy seat->workspace_osd_timer on exit 2024-11-12 16:21:06 +09:00
tokyo4j
b08f753497 icon-loader: fix memory leak of icon_loader->icon_theme 2024-11-12 16:21:06 +09:00
tokyo4j
3f2cc1b29f osd: fix memory leak of output->osd_buffer 2024-11-12 16:21:06 +09:00
enometh
2d3be5ab56
src/output.c: skip painting output when session is not active
On switching to a console vt when an application is painting,
labwc produces a stream of log messages of the form
```
 `00:00:52.345 [ERROR] [../src/output-state.c:45] Failed to commit frame` lines.
``

This patch tries to follow the lead from the solution to this problem
in https://github.com/WayfireWM/wayfire/pull/2484.patch

As noted in that commit message, this patch depends on unreleased
patches to seatd (master) to work reliably, and there may be a a risk
of locking up the labwc if it is used with the seatd-0.8.0.

Check that the session is initialized (is not NULL) before checking it
is active.

Co-authored-by: Madhu <enometh@net.meer>
2024-11-12 00:33:38 +01:00
Jens Peters
8a5608a3af input: add hold-begin/-end gestures 2024-11-11 15:06:25 +01:00
Jens Peters
7195d7793c input: ensure visible cursor on gestures 2024-11-11 15:06:25 +01:00
Jens Peters
8d99450fc9 input: notify idle-manager on gestures 2024-11-11 15:06:25 +01:00
Jens Peters
37b4e17788 input: use CONNECT_SIGNAL macro 2024-11-11 15:06:25 +01:00
Johan Malm
a88c721979
environment: ignore env var assignments > 1 KiB (#2325)
...to guard against recursive constructs like FOO=$FOO:bar which would
grow on each reconfigure.

Add log message as well as a warning against this in the man page.
2024-11-10 20:40:51 +00:00
Jens Peters
fc774d0071 input: hide cursor when using touch input
Hide the cursor on touch input and keep the cursur invisible
until pointer or tablet input.
2024-11-10 17:08:38 +09:00
Jens Peters
d1cde3c435 input: close xdg-popups on touch down
Taken over and now shared from the tablet implementation.
2024-11-10 17:08:38 +09:00
Jens Peters
7e0cd8ee5a input: move notify-idle-manager to tablet/touch handlers
Move them away from the cursor emulate functions. This
avoid calling them twice for touch motion.

Also notify idle manager on touch down/up.
2024-11-10 17:08:38 +09:00
Jens Peters
eed972cef1 input: clear pointer focus on touch input
Otherwise the pointer focus could interfere with touch input, like
showing hover effect on unexpected locations.
2024-11-10 17:08:38 +09:00
Jens Peters
3dbd5f30fc input: move touch only with one touch point
In other words, do not move the cursor when more than
one finger is down.
2024-11-10 17:08:38 +09:00
Jens Peters
a3d8688c17 input: warp cursor to touch coordinates
This makes the behavior consistent with non-touch
capable surfaces and the desktop.
2024-11-10 17:08:38 +09:00
Consolatis
4415178707 meson.build: increase wlroots dep to 0.18.1
This ensures users do not run into asserts()
when using the ext-foreign-toplevel-list protocol.
2024-11-09 20:06:19 +00:00
Consolatis
d6a48ab7a7 foreign-toplevel: add ext-toplevel-list support 2024-11-09 20:06:19 +00:00
Consolatis
2a825008c6 foreign-toplevel: create generic abstraction 2024-11-09 20:06:19 +00:00
Consolatis
5e1f91c9d1 view: add state change signals 2024-11-09 20:06:19 +00:00
Weblate
043e597376 Translation updates from weblate
Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/de/
Translation: Labwc/labwc
2024-11-08 21:42:46 +00:00
Simon Long
e8d80711f8
icon: matching partial strings (#2266)
...to handle for example app-id="gimp-2.10" with file "gimp.desktop"
2024-11-08 21:42:02 +00:00
tokyo4j
6d53b5a864 action.c: fix style 2024-11-08 21:33:34 +00:00
tokyo4j
0aaa2e0102 menu: correctly center menu opened with <position {x,y}="center">
Prior to this commit, a menu opened with:

  <action name="ShowMenu">
    <position x="center" y="center" />
  </action>

was not correctly centered when menu.items.padding.x is non-zero.
2024-11-08 21:33:34 +00:00
tinyboxvk
3c39ed38b5 Remove link to archlabslinux
Project is no longer available.

https://archlabs.github.io/
2024-11-08 21:30:48 +00:00
Simon Long
01f6c5d073
src/seat.c: Allow pointer speed of -1 2024-11-08 21:38:56 +01:00
tinyboxvk
869c654fc1 Fix broken links to Openbox
Signed-off-by: tinyboxvk <13696594+tinyboxvk@users.noreply.github.com>
2024-11-08 21:26:39 +01:00
Johan Malm
7e50c60b00 buf.c: fix off by one bug in buf_add_char()
Written-by: @Consolatis

Fixes: #2313
2024-11-07 23:34:48 +01:00
Johan Malm
44d1e199db tests: add buf_add_char() test
...to prove off-by-one test with ASAN.
2024-11-07 23:34:48 +01:00
John Lindgren
62a25da575 output: factor out configure_new_output() from new_output_notify()
... to make it possible in future to *not* immediately auto-configure
new outputs when connected. No functional change intended at this time.
2024-11-06 20:46:50 +00:00
John Lindgren
c38cb5f59c output: move a few calls from new_output_notify()
... to more specific/logical locations, to make it possible in future to
*not* immediately auto-configure new outputs when connected.

In particular:

- Move regions_reconfigure_output() and session_lock_output_create()
  into add_output_to_layout(), which would be called also if the output
  is enabled later.

- Move seat_output_layout_changed() to do_output_layout_change() so it
  is called for any layout change, not just adding new outputs.
2024-11-06 20:46:50 +00:00
Tomi Ollila
f052eaea6f menu: use only menu_separator_padding_width to pad separators w/o label
I.e. drop the extra padding from menu_item_padding_x that got there
when separators with labels were implemented.
2024-11-06 20:40:28 +00:00
Consolatis
aaf60b3520 CI: add discussion category to IRC notification 2024-11-06 14:36:58 +01:00
Consolatis
02e85b8298 CI: add IRC notification for discussion created 2024-11-06 14:22:25 +01:00
Weblate
0137ffaf8c Translation updates from weblate
Co-authored-by: Roberalz <lumintnian@outlook.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/es/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/eu/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/gl/
Translation: Labwc/labwc
2024-11-05 17:55:23 +00:00
Ricardo Steijn
8f940358e4
tearing: avoid permanent disable due to rejected commits (#2295)
Currently, the cursor plane does not allow async page flips which causes tearing page flips to be rejected if the cursor was moved.

However, in games where no cursor image is present, the async page flips can still work as expected.

Instead of permanently disabling tearing after too many failures, test the output state first before each frame to see if we can commit with tearing_page_flip set to true.
2024-11-03 21:05:46 +00:00
Johan Malm
c29d8a2174 Add github issues template 2024-11-03 20:20:27 +00:00
tokyo4j
49587d48d6 docs: add documentation for window.button.height 2024-11-03 20:14:33 +09:00
Andrew J. Hesford
14aad38a2c query: fix three-state-parameter parsing, simplify match logic
Fixes: #2288.
2024-11-01 12:52:10 -04:00
Andrew J. Hesford
2b877d2293 config/rcxml.c: fix parsing of three-state query parameters 2024-10-30 21:53:23 -04:00
Orfeas
96da82c085 query: support additional conditions for matching clients
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>

Closes: #2245.
2024-10-30 14:30:26 -04:00
John Lindgren
f394d03600 session-lock: make session_lock_output_create() safe to call twice
session_lock_output_create() can safely no-op if the lock output has
already been created for the specified output. This scenario doesn't
happen currently, and the change is in preparation for some other
output-related changes I am working on. But I think it's a nice code
improvement worth merging separately.
2024-10-29 21:41:48 +00:00
John Lindgren
7912665b0f output: remove ported wlr_output functions
We have several wlr_output_* functions which are just wrappers around
corresponding wlr_output_state_* functions and don't actually touch the
wlr_output itself. These probably made some sense historically, but IMHO
they are just confusing now. So remove them and call wlr_output_state_*
directly.

Rename wlr_output_commit() (still useful) to output_state_commit().
2024-10-29 21:39:19 +00:00
Simon Long
45a9bd95e7
Add mouse emulation for touch devices (#2277) 2024-10-29 19:22:01 +00:00
01micko
4d3efb4339 src/main.c: add environment variable LABWC_VER
src/config/session.c add env var LABWC_VER
This could be useful going forward for helper programs
such as `labwc-menu-generator` or `labwc-tweaks`
2024-10-28 21:40:01 +00:00
Johan Malm
3b00aabd93 keyboard: broadcast modifiers
...to all clients rather than just the one with keyboard focus on keyboard
enter/create, modifer press/release and wlr_seat_set_keyboard().

This enables:

- Clients such as panels to display the current keyboard layout without
  introducing new wayland protocols or other IPC.

- Unfocused xdg-shell clients to understand button press with keyboard
  modifiers for example Ctrl+click.

The keymap is forwarded to all clients in wlr_seat_set_keyboard(). When a
keymap contains multiple layouts, the selection is made via modifiers,
which previously were only sent to the client with keyboard focus.

Tested with: https://github.com/johanmalm/keyboard-layout

Ref: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4496

Fixes: #2271
2024-10-28 19:11:45 +00:00
Tomi Ollila
ad2d24fb42 menu: use "MenuHeader" font height in separators with label 2024-10-28 19:06:32 +00:00