Commit graph

1959 commits

Author SHA1 Message Date
tokyo4j
f6d588507e style: prettify comments
Prettify comments formatted by clang-format at commit 77328698
2024-03-07 20:30:50 +00:00
Consolatis
95e8573388 src/output.c: refactor virtual output related functions
This commit moves the virtual output related functions
into their own file at `src/output-virtual.c` with its
own include file to reduce `include/labwc.h` bit by bit.

Additionally, it removes the need to keep the
`server->headless.pending_output_name` char array around
by temporarily disconnecting the handler when creating a
new virtual output. This allows to set the output name
right in the `output_virtual_add()` call rather than to
store the pending name until the new output event handler
has been called.

It also makes adding a virtual fallback output easier in
a follow-up PR.
2024-03-07 19:51:54 +00:00
Consolatis
1b9176c427 src/action.c: remove assumption about MoveToOutput direction being valid 2024-03-06 18:34:56 +00:00
Consolatis
983ca66d07 src/action.c: fix MoveToOutput action by renaming 'name' argument
We were using the argument name 'name' before
which is already used by the action itself:
`<action name="MoveToOutput" name="HDMI-A-1" />`

Change the argument name to "output" which also
matches the `FocusOutput` action.

Fixes: #1589
Reported-by: @bnason (thanks!)
2024-03-06 18:34:56 +00:00
Johan Malm
4d68ee424a osd: show preview for windows on other workspaces
Written-by: @Consolatis
2024-03-05 22:16:55 +01:00
Johan Malm
72a41058af osd: only call wl_array_{init,relesase} once 2024-03-05 22:16:55 +01:00
Johan Malm
247d2b581c osd: optionally show windows on all workspaces
Also share common config option (rc.window_switcher.criteria) in osd.c and
desktop.c to make sure the window lists are always consistent.

Configure with `<windowSwitcher allWorkspaces="yes|no">`
2024-03-05 22:16:55 +01:00
Johan Malm
41419d9479 osd: do not use server->workspace_current->tree
...as it is no longer needed following the use of shared infrastructure
between osd.c and desktop.c introduced in the last few commits.
2024-03-05 22:16:55 +01:00
Johan Malm
7704b595d3 osd: restore preview at end of cycling
...so that sub-views are shown in front of root ones.
2024-03-05 22:16:55 +01:00
Johan Malm
79bca44cb1 window-rules: add root-toplevel critiera 2024-03-05 22:16:55 +01:00
Johan Malm
c71fccbcec osd: include always-on-top views in window-switcher 2024-03-05 22:16:55 +01:00
Johan Malm
777e6bb868 desktop: refactor desktop_cycle_view()
...in preparation for using common window-rule criteria with osd.c

No functional change intended.

Related-to #1454
2024-03-05 22:16:55 +01:00
John Lindgren
6a35e8e78c view: remove view_is_related(), no longer used 2024-03-05 20:51:32 +00:00
John Lindgren
bb8f0bc960 seat: don't deactivate view for any non-view surface
Now we now longer gray-out the active window when opening a focusable
popup menu (e.g. the applications menu from an XWayland panel). This
matches Openbox behavior.
2024-03-05 20:51:32 +00:00
John Lindgren
11cdad0c11 Revert "desktop: allow re-focus between "globally active" views of the same PID"
This is undesired when a focusable popup (e.g. applications menu) of an
unfocusable view (e.g. XWayland panel) is closed.

This reverts commit f6e3527767.
2024-03-05 20:51:32 +00:00
John Lindgren
4eb34f97de xwayland: remove "try to focus on parent surface" logic
This was apparently to fix an Intellij focus issue, but I don't see any
issues with Intellij currently, and the logic is wrong when the parent
XWayland surface doesn't want focus (e.g. an XWayland panel with a
focusable applications menu).
2024-03-05 20:51:32 +00:00
John Lindgren
9e3785f8cd xwayland: treat Globally Active windows according to type
Tested with IntelliJ IDEA and JDownloader 2, which were problematic in
the past.

Fixes: #1139 #1341
2024-03-05 20:51:32 +00:00
Simon Long
3ebc07f7aa
Handle touch on headerbar (#1550)
...using cursor emulate events.
2024-03-05 20:41:17 +00:00
tokyo4j
334cd09106 IME: support input method 2024-03-05 20:28:15 +00:00
Consolatis
7e60c57b81 src/server.c: filter out xwayland shell for usual clients 2024-03-04 21:35:40 +00:00
Consolatis
74501bc7fa src/output.c: restore flicker free resize when running nested
PR #1301 did partly revert the first variant because
`lab_wlr_scene_output_commit()` (which uses the `output->pending`
state in contrast to `wlr_scene_output_commit()`) was deemd to
cause 'frozen' frames during video playback (#1273).

We are now back at using `lab_wlr_scene_output_commit()` for
unrelated reasons and the cause of the original issue #1273 was
likely that `wlr_scene_output_send_frame_done()` was only sent
on a successful commit. This was changed to always be sent.

So lets restore the flicker free nested resize as well.
2024-03-04 21:24:17 +00:00
John Lindgren
c78750283f key-state: use struct assignment 2024-03-04 02:27:40 +01:00
Andrew J. Hesford
c9d08f8218 session: only update activation environment...
...when running DRM backend or by explicit request
2024-03-04 01:57:32 +01:00
David F
22fe8cf546
session.c: updated dbus activation environment with more env vars
Fixes: #694
2024-03-03 18:47:58 +01:00
Andrew J. Hesford
f90b7dca2a session: run shutdown script, clean up activation env before exit 2024-03-02 21:30:03 -05:00
Johan Malm
4ddeb3cd42 action: reduce MoveToOutput logging 2024-03-02 21:23:01 +00:00
Johan Malm
3c3bcc2765 view: add MoveToOutput wrap attribute
Support `wrap` in view_get_adjacent_output(). This means that when seeking
an adjacent output in a particular direction from an output that is
already furthest in that direction within the layout, rather than
returning NULL, wrap around from the leftmost to the rightmost, or topmost
to the bottommost and vice versa.

Example usage:

    <action name="MoveToOutput" direction="right" wrap="yes" />

Wrap is disabled by default to keep the user interface consistent.
2024-03-02 21:23:01 +00:00
Johan Malm
7e338fc365 view: fix view_get_adjacent_output() bug
...when using more than two outputs.

Use the centre of the view's output as the reference coordinate when
seeking adjacent outputs.

Fixes: #1582
2024-03-02 21:23:01 +00:00
Consolatis
ccbc75571a src/xdg-popup.c: delay popup unconstrain until after first commit
Fixes: #1372
2024-02-25 11:49:03 +00:00
Consolatis
598ab9bcff src/layers.c: delay popup unconstrain until after first commit
Fixes: #1372
2024-02-25 11:49:03 +00:00
Sachin Bhat
6fb06c54c2 config: support libinput sendEventsMode
This allows to enable / disable libinput devices.

Co-Authored-By: @Consolatis
2024-02-24 21:36:53 +01:00
Jens Peters
9456b50983 seat: fix configure condition for click method
Exclude none (zero) from the bitmask test , otherwise
the bitmask test is always true when click method is
configured to 'none' and as a result the configuration
will be skipped.
2024-02-24 20:39:54 +01:00
Consolatis
7adf5533f9 src/output.c: log when disabling adaptive_sync on a nested labwc 2024-02-22 23:40:03 +01:00
Consolatis
d69faffc4e src/output.c: notify clients about config errors
Preliminary fix for #1525.

Based on the protocol we should also revert all
previously correctly committed outputs. #1528
is doing just that but may cause regressions so
we need a short term solution and then deal with
potential issues in #1528 after the release.
2024-02-22 23:40:03 +01:00
Marvin Dostal
8be9c38460
Add click method libinput option (#1416)
<libinput>
  <device>
    <clickMethod>none|buttonAreas|clickfinger</clickMethod>
  </device>
</libinput>
2024-02-21 17:19:48 +00:00
Andrew J. Hesford
17bad48d87 edges: better ignore edges of windows not on same output as moving view 2024-02-14 22:08:31 -05:00
Consolatis
d3b0c69ec1 src/debug.c: detect more scene trees
Also
- resolve workspaces names and view app_id
- truncate everything
2024-02-14 21:25:41 +00:00
Consolatis
29a26d5ff7 edges: do not apply resistance to invisible edges 2024-02-14 21:20:45 +00:00
Consolatis
7500120670 src/ssd: ensure we crash properly when compiled without asserts 2024-02-10 19:22:12 +01:00
Consolatis
a5c6b2f83d Prevent 'unused variable' warnings when compiled without asserts 2024-02-10 19:22:12 +01:00
Consolatis
e9552fb661 src/seat.c: provide NULL fallback for output name
This fixes a warning when doing a release build.
2024-02-10 19:22:12 +01:00
Andrew J. Hesford
6c87254146 view: cancel interactive resize when shading 2024-02-08 17:33:23 +00:00
Johan Malm
8b9ea7b343
Merge pull request #1491 from Consolatis/feature/fix_invisible_resize_area
src/ssd: allow invisible resize area across outputs
2024-02-07 22:13:57 +00:00
Ph42oN
f7e811f2fa
output: allow changing adaptive sync state
Fixes: #1412
2024-02-07 22:17:17 +01:00
Andrew J. Hesford
2c4f7e86dc
Merge pull request #1508 from ahesford/follow_the_white_rabbit
Refinements to edge behavior
2024-02-07 15:44:42 -05:00
Andrew J. Hesford
8a0f1f9355 resistance: only resist "entry" into another window space 2024-02-06 11:26:42 -05:00
Consolatis
b013cbba3a src/ssd: allow invisible resize area across outputs
This uses the new `view->outputs` bitset to calculate the intersection
with *all* outputs the view is currently visible on.

This ensures that the invisible resize handle works across outputs
while still making sure that it won't leak into neighboring ones just
because it is positioned closely to an output edge (either manually,
maximized or snapped via SnapToEdge or SnapToRegion).

Co-Authored-By: @johanmalm

Fixes: #1486
Reported-By: @lurch
2024-02-06 17:24:21 +01:00
Consolatis
382068e452 src/view.c: store outputs the view is visible on 2024-02-06 17:23:45 +01:00
Consolatis
e480c57445 src/theme.c: minor code improvements 2024-02-06 16:47:05 +01:00
Consolatis
bfd9437fc4 src/theme.c: use rounded hover overlays
Fixes: #1504
2024-02-06 16:47:05 +01:00