Commit graph

909 commits

Author SHA1 Message Date
Consolatis
aab12453dc src/action.c: Fix includes for kill() and getpid()
Fixes #410

Backport of c49f4e735d
2022-08-10 06:48:31 +02:00
Consolatis
88f69a28f1 CI: sync workflows with master branch 2022-08-10 06:36:44 +02:00
Consolatis
6f13ae2449 Prevent missing direction arguments to segfault labwc
Reported-by: @Flrian
Backport of 986ab70780
2022-08-10 05:51:55 +02:00
Consolatis
e5a511668e src/config/keybind.c: fix keybind insertion order
This restores the intended behavior of keybinds set by `<default />`
to be overwritten by manually configured keybinds which come later in
the config.

In `src/keyboard.c`, `handle_keybinding()` is going backwards through
the list of keybindings and breaks after the first match.

`wl_list_insert(&list_node, item)` will insert the new item *after* the
list_node so if its called multiple times with the same list_node as
fist argument the result will be a reversed list. Using `list_node.prev`
instead will result in a non-reversed list.

Backport of 39cdba36a8
2022-08-10 05:51:55 +02:00
Johan Malm
67ed986969 action.c: use kill() instead of spawning killall
Also update documentation to say `killall -s SIGHUP labwc` to make
it work on Void Linux.

Fix #393

Backport of 5f30773a6e
2022-08-10 05:51:55 +02:00
Johan Malm
f20fc65f41 buf.c: fix bug in environment variable expansion
Allow underscore in environment variable names.

Closes issue #439

Helped-by: @Consolatis
...who both found the bug and told us how to fix it :)

Backport of fd7ec0ab95
2022-08-10 05:51:55 +02:00
Consolatis
519d97a897 config/rcxml.c: Fix parsing of adaptiveSync setting
Backport of 79b1630724
2022-08-10 05:51:55 +02:00
Johan Malm
bea35f1969 build: bump version to 0.5.3 2022-07-15 18:34:06 +01:00
Flrian
916f9a79ea output-power-management: add damage_all_outputs() 2022-06-14 05:25:04 +02:00
Johan Malm
834ee3dfd4 output: fix incorrect call to private wlroots function
Use wlr_output_test() instead of output_ensure_buffer() which is not a
public function and only compiled when linking statically to wlroots.

Also wlr_output_rollback() on failed test.

Fixes issue #273

Backport of 5fd5024ca6
2022-06-14 05:25:04 +02:00
bi4k8
0fb33066e9 support wlr-output-power-management
Backport of c23397f362
2022-06-14 05:25:04 +02:00
bi4k8
e4399b03e2 add wlr-output-power-management protocol
Backport of 748b3d38e7
2022-06-14 05:25:04 +02:00
Johan Malm
12718e5e63 xwayland: call foreign-toplevel-destroy on unmap
Some xwayland clients leave unmapped child views around, typically when a
dialog window is closed. Although handle_destroy() is not called for
these, we have to call foreign-toplevel-destroy to avoid panels and the
like incorrecly showing them.

Backport of 62ae87bbd9
2022-06-03 19:35:07 +01:00
Johan Malm
83f8e4952d labwc-action(5): remove incorrect <command>
<action name="Close"> does not support a <command> option

Backport of e2632e8587
2022-06-03 19:35:07 +01:00
Johan Malm
03c6f23d6d xwayland: handle set_override_redirect events
This is needed to allow X11 applications to create surfaces as
non-override_redirect and then change them to override_redirect later

Without this gitk-menus and rofi are treated as xwayland-views with
associated server-side-decoration and forced positioning.

Backport of 81f216b6a2
2022-06-03 19:35:07 +01:00
Jelle De Loecker
9b593e4715 xwayland-unmanaged: focus parent surface on unmap
Re-focus on parent surface if it is available

Fixes #352 relating to JetBrains and Intellij focus issues

Backport of 61675b521c
2022-06-03 19:35:07 +01:00
Consolatis
65e158e4c1 IRC notifications: add to v0.5 branch as well 2022-06-02 13:41:05 +02:00
Consolatis
9cd502f0bf cursor.c: Do not segfault on missing drag icon
Observed by moving tabs in chromium wayland native
(started with --ozone-platform-hint=wayland).

Backport of 47912aebb6
2022-05-29 19:52:14 +01:00
Consolatis
0284956ce8 src/cursor.c: Ignore out-of-surface movement for surfaces without views
Backport of 499df78531
2022-05-29 19:52:14 +01:00
Consolatis
0738965f2d src/cursor.c: Ensure we send a release event for out-of-surface scrolling
Backport of b24b9d2d23
2022-05-29 19:52:14 +01:00
Johan Malm
74da710c98 cursor: offset xdg invisible border when dragging outside view
Note: view->padding was deleted in commit b279550 as the wlroots
scene-graph xdg-surface commit handler offsets the CSD invisible border.
If view->padding still existed, we could have used that, but considering
that this is probably the only place where this offset will now be
needed (because we're generating surface local coordinates), it's simpler
to just do it locally.

Related to issue #340

Written-by: @Consolatis
Backport of 81810db3b6
2022-05-29 19:52:14 +01:00
Consolatis
cc0e2769d9 src/cursor.c: Fix branch condition for out-of-view selecting/dragging
Instead of using the stored view for comparison use the actual surface.

Before this patch, there were situations where the branch intended for
out-of-window text selection / scrollbar dragging was used even though
the cursor never left the surface.

Partly fixes #340
Fixes #347

Backport of 6dd290afc9
2022-05-29 19:52:14 +01:00
Johan Malm
ae15be8555 resistance.c: initialize 'flags' to zero
...in both resistance_resize_apply() and resistance_move_apply()

Failure to initialize these variables sometimes causes windows to stick to
edges during move/resize.

Issues #331 and #309 may be related to this
2022-05-18 20:58:54 +01:00
Consolatis
fb6335e23d Prepare for release of 0.5.2 2022-05-17 20:27:22 +01:00
Consolatis
253c53cd28 cursor.c: make sure resize_edges is always assigned a value
Fixes #318
2022-05-17 17:32:35 +01:00
Johan Malm
0a2385e597 build: set 'check: false' on run_command
Future meson releases will change the default, so we explicitly set
check: false to maintain behaviour
2022-05-10 02:30:35 +02:00
Eli Schwartz
33326fc086 meson: use proper dependency fallback for wlroots
Make the subproject wrap file declare the dependencies it provides.

Remove the manual subproject invocation and allow Meson to select
whichever wlroots it finds which satisfies the version requirement --
either a system one via pkg-config, or the subproject fallback.

Use a dependency-generic method of acquiring wlroots configuration info
-- enabled features are present in the pkg-config file and additionally
exported as declare_dependency() variables, so there is no need to do C
preprocessor checks for it.

This ensures that Meson best practices are followed, and also...

Fixes #318

Backport of 2656cf525f to v0.5
2022-05-10 02:13:22 +02:00
Johan Malm
fe237ea480 build: bump version to 0.5.1 2022-04-08 21:44:37 +01:00
John Lindgren
a50d27c770 cursor: Fix "jumping opposite edges" issue when resizing.
Commit ec68806354 ("xwayland: Honor size increments from
WM_SIZE_HINTS") adjusted only the window width/height according
to the size hints.  If resizing from the top or left edge of the
window, we also need to adjust the window position to keep the
bottom or right edge from jumping around.
2022-04-04 17:30:20 +01:00
John Lindgren
ec68806354 xwayland: Honor size increments from WM_SIZE_HINTS 2022-03-20 21:22:14 +00:00
Consolatis
03826a1348 xwayland.c: Do not raise window if deactivating
Fixes #270
2022-03-12 14:23:22 +00:00
Consolatis
a52feadaa7 Restore Drag mouse bindings and proper double click
Fixes #258 and #259

Reported-by: @ahmadraniri1994
Reported-by: @01micko
Suggested-by: bi4k8 <bi4k8@github>
2022-02-27 22:18:41 +00:00
Consolatis
1d9c9d1afc Implement cursor input for overlay popups 2022-02-26 20:27:43 +00:00
Johan Malm
ce38d2dbd6 cursor: add cursor_update_focus()
...and call it from desktop_move_to_front() in order force an enter event
on the surface below the cursor when cycling views.

Fixes #162 and #225
Inspired by PR #164 - just restructured it a bit.

Suggested-by: @bi4k8
Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
2022-02-26 20:23:55 +00:00
Consolatis
841b6550a9 xwayland.c: Fix positioning with multiple queued configure events
Prevents a single action like ToggleDecorations + ToggleMaximize to
position the view somewhere with negative coordinates when unmaximizing.

It may still position the view on negative coordinates but later commit
events will fix the position. This issue only exists on xwayland because
there are no configure serials which we could use to ignore all
repositioning until we are at the latest desired state.
2022-02-26 20:23:30 +00:00
Consolatis
00b2925461 cursor.c: Keep sending adjusted motion events while button is pressed
This allows to keep dragging a scrollbar or selecting text even when
moving outside of the window. Fixes #241
2022-02-26 20:22:49 +00:00
Consolatis
afa3eb1572 Merge branch 'master' into v0.5 2022-02-21 04:20:40 +01:00
Johan Malm
3d6e942eee README.md: add link to IRC channel 2022-02-20 15:02:53 +00:00
Johan Malm
1baf5cb9b8 README.md: fix typo (issue #248) 2022-02-20 15:02:08 +00:00
John Lindgren
7488ec53dd Implement cursor input for unmanaged XWayland surfaces
This is necessary for menus in X11 apps to work properly.
Otherwise, any region of the menu that extended out beyond the main
application window was not receiving any mouse input.

Adapted from sway's code.
2022-02-20 13:30:29 +00:00
Johan Malm
68d897e1f5 NEWS.md: add notes on 0.5.0 2022-02-18 21:54:07 +00:00
Johan Malm
b7818df434 build: bump version to 0.5.0 2022-02-18 21:24:38 +00:00
hype3
9ba2a4fd4b Update README.md 2022-02-17 18:45:41 +01:00
hype3
603280bd89 Update README.md 2022-02-17 17:45:05 +01:00
Johan Malm
588f233151 output: render overlay lay popups
This enables sfwbar popups and fixes issue #239

https://github.com/LBCrion/sfwbar
2022-02-13 09:45:42 +00:00
ARDiDo
7c437eac2f OSD: Use separate OSD texture for each output 2022-02-09 21:57:32 +00:00
ARDiDo
049b84409e OSD: Scale OSD to the largest output scale 2022-02-09 21:57:32 +00:00
Consolatis
53df672dda Reload environment on SIGHUP. Partly fixes #227 2022-02-08 06:08:12 +00:00
Johan Malm
e1328c055d wlroots.wrap: use 0.15.1 2022-02-07 16:53:37 +00:00
Michael Weiss
6a3536cdd7 build: Relax the version constraint for wlroots to accept patch releases
Patch releases only contain backwards compatible changes (mainly bug
fixes) so we want to allow them. This fixes the build with the recently
released wlroots 0.15.1 and uses the same version constraints as other
projects that depend on wlroots (e.g., Sway).
2022-02-04 21:44:54 +00:00