Commit Graph

78 Commits

Author SHA1 Message Date
Guido Cella
298949bbc4
place child clients above fullscreen clients
When a child window of a fullscreen client is mapped, the fullscreen is
disabled, and if the previously fullscreen client is floating the child
window is rendered below it and cannot be seen, causing confusion,
though it is still focused and interactable.

Fix this by putting children of fullscreen clients in LyrFS instead of
LyrFloat, and by returning before the unset_fullscreen code is called
when they are mapped.

focusstack() now lets you switch focus from a fullscreen client to its
child windows, otherwise if you switch focus from the child window to
the fullscreen client you could not focus the child window again and the
fullscreen client would stay unresponsive.

Child clients are not reparented to LyrFloat after leaving fullscreen,
so you could spawn a child window, focus back the fullscreen client,
unfullscreen it, and the child window would still be drawn above other
floating clients. Avoid dealing with this edge case to keep the line
count low.

These cases can be tested by pressing Ctrl+o in applications with an
open file dialog.
2024-02-05 16:00:28 -06:00
Guido Cella
17c5cbbf7b
make XWayland clients inherit tags and monitors
Revert 3213088 because the linked bug can no longer be reproduced with
wlroots 0.17, and update client_get_parent() so it doesn't segfault with
XWayland surfaces. This also allows reusing the p variable in the next
commit.
2024-02-05 15:59:46 -06:00
Leonardo Hernández Hernández
0151bd48dd
turn on -Wsign-compare 2024-01-15 02:09:18 +00:00
Leonardo Hernández Hernández
fa660fb61e
check toplevel resources
it's just a aesthetic change
2023-12-12 22:21:32 -06:00
Leonardo Hernández Hernández
49bfe92703
merge X11Managed and X11Unmanaged into X11
now that client_is_unmanaged() checks the wlr struct we don't need to keep
track of it ourselves
2023-12-10 23:46:49 -06:00
Leonardo Hernández Hernández
c88960751d
check if a client is unmanaged checking the o-r flag
it may change at any moment and I don't really want to add a listener for it
2023-12-10 23:46:40 -06:00
Leonardo Hernández Hernández
a0e79d8145
Do not send repeated xdg_toplevel.configure_bounds
Fixes: 32e66f4582
2023-11-21 20:15:46 -06:00
Leonardo Hernández Hernández
7bdbab0400
check toplevel resource instead of client's xdg_shell to set bounds 2023-11-17 11:03:32 -06:00
Leonardo Hernández Hernández
dd25cdb56e
use the new wlroots function to get a toplevel from a wlr_surface
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4419
2023-11-17 11:03:32 -06:00
Leonardo Hernández Hernández
caac2d664d
explicitly return -1 in the first check in toplevel_from_wlr_surface 2023-11-17 11:03:31 -06:00
Leonardo Hernández Hernández
b1740056d5
do not use #ifdef -> #else -> #endif in client_is_x11
all other funcions use #ifdef -> #endif
2023-11-17 11:03:31 -06:00
Leonardo Hernández Hernández
0067c76cab
delete unused functions 2023-11-17 11:03:31 -06:00
Leonardo Hernández Hernández
22d21676b0
style fixes in client_is_float_type 2023-11-17 11:03:31 -06:00
Leonardo Hernández Hernández
d6c102d9db
correctly check if the scene node is enabled in client_is_rendered_on_mon 2023-11-17 11:03:31 -06:00
Leonardo Hernández Hernández
0e897608a1
do not use magical numbers to check edges
the interface is declared stable, which means we could just use 0 anyway
2023-11-17 11:03:31 -06:00
Leonardo Hernández Hernández
6d0ec595d3
simplify client_get_clip
the clips for xwayland and xdg clients are pretty similar, after all we only
need to adjust x and y for xdg clients
2023-11-17 11:03:31 -06:00
Leonardo Hernández Hernández
e1f3983bf8
use wlr_scene_subsurface_tree_set_clip
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4131
Closes: https://github.com/djpohly/dwl/issues/411
2023-11-14 19:44:43 -06:00
Leonardo Hernández Hernández
31bf1cbaf6
Revert "respect size hints"
This reverts commit 72e0a560d9.
2023-11-14 19:44:28 -06:00
Leonardo Hernández Hernández
e5e74acfce
send maximized if tiled isn't supported (XDG shell)
wlroots doesn't do it automatically anymore

References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4409
2023-11-01 12:04:59 -06:00
Leonardo Hernández Hernández
b299e01e44
Merge remote-tracking branch 'upstream/main' into wlroots-next 2023-10-09 11:45:51 -06:00
Leonardo Hernández Hernández
a18c528300
simplify setting the border color of clients 2023-10-09 11:05:41 -06:00
Leonardo Hernández Hernández
d4f2c6bfd6
chase wlroots!4288
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4288
2023-08-21 17:53:24 -06:00
Leonardo Hernández Hernández
25db045392 set withdrawn state for xwayland invisible clients 2023-07-31 18:19:41 -06:00
Leonardo Hernández Hernández
78cf88670f add support for xdg-shell v6 2023-07-31 18:19:41 -06:00
Leonardo Hernández Hernández
06bc65549f
chase wlroots map logic unification
Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
2023-06-02 22:03:41 -06:00
Leonardo Hernández Hernández
e7f736ccc9
chase wlroots!3391
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3991
2023-02-02 10:30:24 -06:00
Job79
7ae5039b4f follow upstream xwayland_surface changes
wlroots removed the `wlr_surface_is_xwayland_surface` function, and renamed `wlr_xwayland_surface_from_wlr_surface` to `wlr_xwayland_surface_try_from_wlr_surface`.

related commit: fbf5982e38
2023-02-01 14:16:54 -06:00
Leonardo Hernández Hernández
be854cab35
do not try to resize if size wouldn't change 2022-12-24 16:44:09 -06:00
Leonardo Hernández Hernández
6ca011430a
do not skip frames if a client is stopped and have a pending resize 2022-12-24 16:44:09 -06:00
Leonardo Hernández Hernández
7eaa01ac1f
Revert "Revert "fix flickering when resizing/spawning windows""
This reverts commit 4a32293548.
2022-12-24 16:44:09 -06:00
Ben Jargowsky
a39a46c908 Check width and height are not negative in client_set_bounds() 2022-12-15 23:42:53 -06:00
Leonardo Hernández Hernández
4a32293548
Revert "fix flickering when resizing/spawning windows"
This reverts commit 017bb7d752.

Bug: https://github.com/djpohly/dwl/issues/349
2022-12-06 13:58:56 -06:00
Leonardo Hernández Hernández
22336612ae
improve type safety of toplevel_from_wlr_surface() 2022-12-05 23:18:02 -06:00
Leonardo Hernández Hernández
38bd00351a
merge toplevel_from_{wlr_layer_surface,popup} into client_from_wlr_surface
now it is a big function called toplevel_from_wlr_surface
2022-12-05 23:18:01 -06:00
Leonardo Hernández Hernández
c56bc42eb5
sort client_get_parent() 2022-12-05 23:18:01 -06:00
Palanix
017bb7d752
fix flickering when resizing/spawning windows
Fixes: https://github.com/djpohly/dwl/issues/306
2022-12-03 13:14:10 -06:00
Leonardo Hernández Hernández
b4fb1f77c7
fix xwayland clients being floating by default
Fix 3213088aa2
References: https://github.com/djpohly/dwl/pull/334#issuecomment-1333147730
2022-12-01 20:51:00 -06:00
Leonardo Hernández Hernández
fcb3fa4e90
Merge remote-tracking branch 'upstream/main' into wlroots-next 2022-11-10 23:25:48 -06:00
shua
f1639ba9d5
check null in toplevel_from_popup
managed to SEGFAULT the server by trying to create a popup
without setting a parent first.

Not sure if this is dwl or wlroots issue, so also opened a ticket upstream: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3811
2022-11-09 00:01:50 -06:00
Leonardo Hernández Hernández
6a0ec2a8c3
Merge remote-tracking branch 'upstream/main' into wlroots-next 2022-10-29 18:11:28 -05:00
Leonardo Hernández Hernández
332ceb7136 allow unmanaged clients (like dzen or dmenu) to have keyboard focus 2022-10-15 18:00:24 -05:00
Leonardo Hernández Hernández
952fde68a3
correctly handle cursor motion when button is held (for layer surfaces) 2022-10-08 13:02:43 -05:00
Leonardo Hernández Hernández
ae3d435717
Merge remote-tracking branch 'djpohly/main' into wlroots-next 2022-10-01 23:30:47 -05:00
Leonardo Hernández Hernández
2385d82612
remove unused variables 2022-09-20 23:40:35 -05:00
Leonardo Hernández Hernández
d738573e22
new function to notify keyboard enter 2022-08-27 16:34:29 -05:00
Leonardo Hernández Hernández
b9295e8cee
sort client.h functions 2022-08-27 16:33:46 -05:00
Leonardo Hernández Hernández
e0cc5b046c
Merge remote-tracking branch 'djpohly/main' into wlroots-next 2022-08-26 18:26:36 -05:00
Leonardo Hernández Hernández
07bf1832bf
set monitor for clients that don't have one in updatemons()
only if selmon is enabled and the clients are mapped
2022-08-23 13:28:01 -05:00
Leonardo Hernández Hernández
28af37cd1f
handle client_from_wlr_surface() receiving a subsurface 2022-08-12 23:58:11 -05:00
Leonardo Hernández Hernández
90a12c90a0
always set the same monitor and tags for child clients of a client
fixes #272
2022-07-19 20:13:56 -05:00