Commit graph

1167 commits

Author SHA1 Message Date
Consolatis
296e58079f Prepare OSD for reimplementation of the preview feature 2022-08-28 20:40:29 +02:00
Consolatis
a32e1ff8f9 Chase wlroots: Culling
To update the wlroots subproject use
meson subprojects update wlroots

Chases wlroots fa7d2cb8d60ed48c44c707106c03682056ddfaca
wlr_scene: Only consider visible parts of the node when culling background

Fixes #501
2022-08-27 16:12:14 +01:00
Johan Malm
8a7048fd78 osd: position preview border within SSD max extents
This makes the border visible when alt-tabbing maximized windows and
prevents it from rendering on other outputs or on top of exclusive
layer-surfaces such as panels.

Closes issue #496
2022-08-27 16:14:29 +02:00
John Lindgren
b7c4ba825a view/ssd: Refactor and fix visual indication for active windows
Partially fixes #494.

Co-Authored-by: Consolatis
2022-08-27 06:58:20 +01:00
Consolatis
127a9c7be4 src/{common/font,theme}.c: Switch to cairo helpers 2022-08-26 06:54:12 +01:00
Consolatis
36b2a93a69 Disconnect view from destroying output
Fixes #497

Reported-by @Flrian
2022-08-24 20:24:19 +01:00
Flrian
c1490b632d Add config option to disable preview outlines 2022-08-24 20:21:14 +01:00
John Lindgren
33bc37e7d0 keyboard: Hide Alt-Tab switcher when canceling via Escape 2022-08-21 21:47:45 +01:00
John Lindgren
0dba67a41d osd: Do not show window switcher on disabled outputs 2022-08-21 21:47:45 +01:00
Consolatis
b39020213a src/osd.c: Add preview outlines 2022-08-20 22:40:31 +01:00
Consolatis
fb36463c34 common/graphic-helpers: Add cairo helpers 2022-08-20 22:16:52 +01:00
Consolatis
8c8583ef94 common/graphic-helpers: Add multi_rect 2022-08-20 22:16:52 +01:00
Johan Malm
b5a0d74888 labwc-theme(5): add menu.xbm 2022-08-20 00:11:15 +02:00
Johan Malm
52d1e32b59 view: view_move() s/double/int/ for x and y 2022-08-18 19:50:25 +01:00
yizixiao
46fb3c3dec func output_destroy_notify add free 2022-08-17 14:09:36 +02:00
Johan Malm
0b0e438adb src/cursor.c: refactor nested if-statements 2022-08-17 14:03:38 +02:00
Johan Malm
f19645aa25 cursor: do not clamp motion coordinates for xdg-shell surfaces
...when pointer moves off the xdg-shell surface which is possible when
for example grabbing a scroll-bar or selecting text.

Clamping results in undetected pointer motion when applied in the
direction of movement (for example clamping at view->y masks vertical
movement when the y-coordinate is greater than view->y), which in turn
can appear as sporadic to the end-user.
2022-08-17 14:03:38 +02:00
Consolatis
921c877f79 src/cursor.c: Keep sending motion events for out-of-layer-surface
Previously, motion events for a cursor which had been pressed on a surface
and then moved out of the surface were only sent for XDG and X11 surfaces.

This patch includes layer surfaces as well.

Fixes #483
2022-08-16 19:31:16 +01:00
John Lindgren
8e6d37772e cursor: Do not clamp motion coordinates for XWayland surfaces.
X11 apps expect to be able to receive motion events outside
the window area (this is necessary for client-side move/resize
handles to work properly).  So do not clamp the motion
coordinates for XWayland surfaces.

Before this change, attempting to enlarge an XWayland window
using a client-side resize handle resulted in the window size
lagging behind the mouse cursor quite severely, since each
motion event was in effect allowed to expand the window by
only a few pixels.  The closer the initial button-press was
to the edge of the window, the worse the lag would be.
2022-08-16 19:31:16 +01:00
Johan Malm
19dea7450b keybind: remove default alt-escape for Exit
...because too many have exited the compositor by mistake trying to get
out of alt-tab cycling or similar.
2022-08-12 22:50:56 +02:00
Consolatis
1cdebbc22d src/ssd/ssd_titlebar.c: Completely hide title when running out of space
Before this commit the window title could overflow in certain conditions,
usually when rapidly resizing. This commit fixes it by completely hiding
the corresponding scene node when there is no space available.

Reported-by: <peperino> via IRC
2022-08-12 14:56:51 +01:00
Johan Malm
a610aff946 scaled_font_buffer.c: simplify calls to zfree()
There is no need to check foo != NULL before zfree(foo)
2022-08-12 11:16:17 +02:00
Johan Malm
429df42a8f menu: render submenu arrows 2022-08-12 11:16:17 +02:00
Johan Malm
6a750d465e font: remove unused font_buffer_update() 2022-08-12 11:16:17 +02:00
Johan Malm
70421b1207 menu: do not require label attribute for highest level menu definition
Allow highest level menu definitions - typically used for root-menu and
client-menu - to be defined like this:

    <openbox_menu>
      <menu id="">
      </menu>
    </openbox>

Previously this required a label attribute (which was not used for
anything and could be an empty string) as show below:

    <openbox_menu>
      <menu id="" label="">
      </menu>
    </openbox>

Closes issue #472
2022-08-11 20:59:57 +01:00
Consolatis
ac5c9dae00 src/xwayland-unmanaged.c: Prevent racing configure event to reposition
Fixes #469

Reported-by: @Flrian
Suggested-by: @jlindgren90
2022-08-11 16:19:00 +01:00
01micko
32b176e05e README.md: fix broken link for 'environment' man page
- re: https://github.com/labwc/labwc.github.io/pull/1
2022-08-01 18:57:12 +01:00
Jan Beich
c22a991b2c CI: auto-update freebsd-vm within major version
Reduce the churn by transparently picking up bustage fixes.
2022-07-29 22:21:30 +02:00
Consolatis
4dce894fda src/config/session.c: Handle allocation failures
Reported-by: @heroin-moose
2022-07-29 06:45:24 +01:00
Consolatis
d6ea0d68cf src/config/session.c: Update dbus / systemd activation environment
This allows xdg-desktop-portal-wlr to work out of the box for screen-recording.
If systemd or dbus is not available the environment update will fail gracefully.

This patch will set XDG_CURRENT_DESKTOP=wlroots but a user may change this by
either having the environment variable set before starting labwc or by having
a different value set in ~/.config/labwc/environment.

Based on PR #461 by @Joshua-Ashton
2022-07-29 06:45:24 +01:00
Consolatis
b8995e45dc src/view.c: Fix output handling with no outputs available
Reported-by: @Flrian
2022-07-24 23:04:26 +02:00
John Lindgren
5d0faa2333 xwayland: Process unmanaged client configure requests more quickly
This is a similar fix to 065c37d3f5 but for unmanaged windows.  The issue
could be seen for example when moving the undocked Search Tool window in
Audacious.  For unmanaged windows, we don't track any pending move/resizes,
so just process all client configure requests immediately.
2022-07-23 20:37:59 +02:00
Johan Malm
302b1e8299
Merge pull request #457 from Consolatis/fix/xwayland_seat
xwayland: (Re)set seat when xwayland is ready
2022-07-21 18:13:08 +01:00
Consolatis
3ba75fe2a0 CI: Use MacOS-12 for FreeBSD runner 2022-07-21 04:53:52 +02:00
Consolatis
819404c43b xwayland: (Re)set seat when xwayland is ready
For some reason wlroots will reset the seat assigned to xwayland
to NULL whenever Xwayland terminates. This patch restores the seat
whenever Xwayland is ready again.

Fixes #166
Fixes #444

Thanks @droc12345 for figuring out the actual issue.
2022-07-21 03:57:42 +02:00
Consolatis
6e1dd2dbfa CI: Update FreeBSD runner 2022-07-21 03:57:07 +02:00
John Lindgren
065c37d3f5 xwayland: Process move-only client configure requests more quickly
For a move-only client configure request, treat it similarly to
view_move() by updating the scene-graph immediately, rather than waiting
for handle_commit().  Move-and-resize requests are handled the same as
before.

This (mostly?) fixes the glitchiness that was noticeable when dragging
an undecorated XWayland window (e.g. Audacious in Winamp mode).

Also:

- Reduce some code duplication in handle_request_configure() by
  simply calling configure(), as suggested by @johanmalm in #428.
- Factor out common logic after a move and/or resize into view_moved().
2022-07-18 22:06:12 +01:00
John Lindgren
a0a5cf706e resistance: Do not consider edges of disabled outputs 2022-07-18 22:06:12 +01:00
John Lindgren
2b7be71254 cursor: Move resistance_resize_apply() before view_adjust_size()
This ensures that screen edge resistance does not result in sizes
that violate WM_SIZE_HINTS constraints.

Also correct a coding style issue nearby.
2022-07-18 22:06:12 +01:00
Johan Malm
06cc21664f
Merge pull request #454 from Joshua-Ashton/bump-fd-limit
main: Increase FD limit
2022-07-17 14:24:05 +01:00
Joshua Ashton
722aa042b7 main: Increase FD limit
This defaults to 1024, which is tiny, but is a requirement
for processes using the deprecated `select` function.

We must reset this back whenever we fork to start a new process,
as this is inherited, and breaks applications using `select` otherwise.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2022-07-17 00:59:23 +00:00
Joshua Ashton
6c2bbb42ea common: Add helpers for raising/lowering FD limit
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2022-07-17 00:59:23 +00:00
Johan Malm
fd7ec0ab95 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 :)
2022-07-15 21:51:28 +02:00
Johan Malm
884ad60e1b NEWS.md: add notes on 0.5.3 2022-07-15 20:05:43 +01:00
Johan Malm
eea5a62ea3 NEWS.md: add notes on 0.6.0 2022-07-14 07:20:44 +01:00
Joshua Ashton
a74060381b cursor: Fix crash when creating a cursor constraint
Fix crash when creating a cursor constraint and there is no currently
focused view.

Fixes a crash starting Warhammer 40,000: Dawn of War II (15620)
2022-07-14 05:16:26 +02:00
Consolatis
79b1630724 config/rcxml.c: Fix parsing of adaptiveSync setting 2022-07-14 01:01:10 +02:00
Jan Beich
4b73eac41d CI: upgrade FreeBSD to 13.1
FreeBSD doesn't support /latest and /quarterly package repos on EOL
versions. 13.0 reaches EOL on 2022-08-31, so avoid CI breakage.
2022-07-13 23:43:05 +02:00
Krsna Mahapatra
e05d4600be CI: Add missing deps for Void Linux runner 2022-07-12 06:58:21 +01:00
Consolatis
f1ba0a89fc src/view.c: Prevent crash by killing a moving application
When a view is destroyed labwc calls interactive_end(view) which
may reposition the view which is partly destroyed and doesn't own
any surface anymore. To prevent this scenario from happening don't
call interactive_end() at all and just reset server->grabbed_view
and server->input_mode directly.

Before this patch, the bug could be reproduced by:
- xcalc &
- sleep 5; killall xcalc
- move the xcalc window completely to one of the edges

The change in src/xwayland.c is not required for this bug
to be fixed but may prevent something similar in the future.
2022-07-11 15:58:33 +01:00