aboutsummaryrefslogtreecommitdiffstats
path: root/dwl.c
AgeCommit message (Collapse)AuthorLines
2024-06-20Prevent updatemons() from removing monitors that have been put to sleep from ↵David Donahue-1/+7
the layout
2024-06-20Implement support for output power managementEmil Miler-0/+14
This patch is based on the original stale patch by Guido Cella @guidocella. It has been modified to apply cleanly to the latest v5.0 tag. Since the SLOC limit is now lifted, this core feature should be merged into dwl upstream. Thanks to Dima Krasner @dimkr for the cherry-pick. Closes: #559, #525
2024-06-20Check for null monitor in resize functionRutherther-1/+7
2024-06-20Add output to layout after enabled state is committedRutherther-5/+7
2024-06-20fix: make sure selmon doesn't get set to disabled monRutherther-0/+7
2024-06-20Run startup_cmd in new session and kill the entire groupPeter Hofmann-1/+2
When a user's startup_cmd is a little more complex, e.g. a shell script, and forks off several processes, then killing only the main child pid might leave unwanted processes behind on exit. Not all children will notice when their parent or the compositor has quit. To fix this, put startup_cmd into its own session and process group, and kill the entire group on exit.
2024-06-14Make sure toplevel_from_wlr_surface is called with a valid surface pointerForrest Bushstone-14/+12
2024-06-04make sure clients share the same layer on floating layoutLeonardo Hernández Hernández-1/+16
2024-06-02create a keyboard group for each virtual keyboardLeonardo Hernández Hernández-62/+66
2024-06-02Allow negative coordinates in MonitorRulesA Frederick Christensen-2/+2
Monitor/output position (-1, -1) remains as a single indicator value for autoconfigure layout. Additionally, one minor comment typo is corrected.
2024-05-30Replicate dwm behavior for sloppyfocusForrest Bushstone-1/+1
2024-04-04put wlr_layer_shell top layer below fullscreenchoc-1/+1
fixes wlr_layer_shell top clients showing over fullscreen clients
2024-03-31properly resize on configurex11korei999-1/+1
2024-03-11fix virtual pointersGuido Cella-0/+3
When motionabsolute() is called from warpd, event->time_msec is 0, so motionnotify() doesn't call wlr_cursor_move(). Fix this by explicitly warping the cursor in this case, like it was done before implementing pointer constraints. I don't know if this is a bug in warpd or time_msec is always 0 with virtual pointers, since the only other software that uses the virtual pointer protocol I know of is wl-kbptr, and I can't get that to work with dwl at all.
2024-03-11Support pointer constraints and relative pointer protocolsForrest Bushstone-16/+119
Fixes: https://codeberg.org/dwl/dwl/issues/489 FIxes: https://codeberg.org/dwl/dwl/issues/317
2024-02-07allow toggling the layout before selecting a different oneGuido Cella-1/+2
2024-02-07fix minimum sizeLeonardo Hernández Hernández-2/+2
continuation of 4043fc3093a73174cb63653ba9e742b4738f2ee5
2024-02-05place child clients above fullscreen clientsGuido Cella-5/+8
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-05make XWayland clients inherit tags and monitorsGuido Cella-2/+1
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-05remove useless wlr_scene_node_reparent() callsGuido Cella-2/+0
These don't do anything because wlr_scene_node_reparent() is immediately called again by setfloating() through setmon(). They are also a source of confusion because if you change the wlr_scene_node_reparent() call in applyrules() it takes a while to understand why it doesn't work.
2024-01-30Revert "No need to call updatemons ourselves"Leonardo Hernández Hernández-0/+3
Fixes: https://codeberg.org/dwl/dwl/issues/577 This reverts commit 26d7c9689f6e7eb699f2a63c2093c2a27e411ea3.
2024-01-26Correct specifier-data_type mismatchesA Frederick Christensen-4/+4
2024-01-25configure xwayland surfaces without monitorsGuido Cella-1/+5
For wine clients often configurex11() is called before mapnotify() and therefore c->mon is NULL. configurex11 just returns early in that case, letting these clients stay in the wrong size. For example only the top left part of winecfg and wine uninstaller is drawn, or confirmation dialogs like when closing wine notepad are too big. Fix this by configuring their surfaces like before 88d386b.
2024-01-25implement the virtual pointer protocolGuido Cella-0/+17
This is used by programs like warpd.
2024-01-24do not arrange monitor if it's disabled (wlroots!4520)Leonardo Hernández Hernández-0/+4
This causes us to send negative values to xdg-configures (e.g a bug in our end) References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4520 (cherry picked from commit 4043fc3093a73174cb63653ba9e742b4738f2ee5)
2024-01-20No need to call updatemons ourselvesDevin J. Pohly-3/+0
The output manager in wlroots emits an output_layout.change event when anything changes, so updatemons will be called anyway. ΔSLOC: -1
2024-01-15drop unused variableLeonardo Hernández Hernández-1/+0
2024-01-15turn on -Wfloat-conversionLeonardo Hernández Hernández-9/+10
2024-01-15turn on -Wsign-compareLeonardo Hernández Hernández-7/+9
2024-01-11check if monitor is null before setting gammachoc-0/+2
fixes segfault on monitor disconnect when using wlsunset
2024-01-06Destroy fullscreen node after moving clients off monBen Jargowsky-1/+1
2024-01-01fix posible NULL-dereference in wl_surface.commit handlerLeonardo Hernández Hernández-1/+1
2023-12-27unset DISPLAY before setting up xwaylandLeonardo Hernández Hernández-0/+4
2023-12-27only execute the first keybindingLeonardo Hernández Hernández-3/+2
2023-12-27more style fixesLeonardo Hernández Hernández-13/+14
missed from the previous iteration
2023-12-25create a wlr_keyboard_group for virtual keyboardsLeonardo Hernández Hernández-2/+24
Fixes: https://codeberg.org/dwl/dwl/issues/554
2023-12-18fix typoLeonardo Hernández Hernández-1/+1
Fixes: 7afdc191fe4e9b3d16604b7f0c96f9741247e2d2 Thanks to: David Donahue <david.donahue2996@gmail.com>
2023-12-18tie xdg_toplevel_decorations to ClientLeonardo Hernández Hernández-31/+28
a xdg_toplevel can only have one xdg_toplevel_decoration so there is no need to have a new struct for decorations
2023-12-18Revert "nuke CSDs, hopefully for good!"Leonardo Hernández Hernández-2/+28
The compositor must respond to the client requesting a change to the decoration mode, it does not matter if the compositor chooses a different mode. This reverts commit 9071ce6c848ce214939fb84f85ae77de86de88d7.
2023-12-18Revert "remove typedef `Decoration`"Leonardo Hernández Hernández-0/+5
This reverts commit d1ff1e6f75d9c53c953957b5c0a64e0bcb40008b.
2023-12-17style fixesLeonardo Hernández Hernández-75/+77
2023-12-17use wlr_keyboard_group to manage all keyboardsDavid Donahue-74/+71
2023-12-12check toplevel resourcesLeonardo Hernández Hernández-1/+1
it's just a aesthetic change
2023-12-11restore and respect rootcolorDima Krasner-0/+5
2023-12-10merge X11Managed and X11Unmanaged into X11Leonardo Hernández Hernández-4/+4
now that client_is_unmanaged() checks the wlr struct we don't need to keep track of it ourselves
2023-12-10do not blindly try to send motion events when pointer button is pressedLeonardo Hernández Hernández-9/+9
we don't have to do this if the surface is the same
2023-12-07sort LISTEN calls in createnotify{,x11}Leonardo Hernández Hernández-4/+4
2023-12-07use the same style for urgent() and sethints()Leonardo Hernández Hernández-4/+4
2023-12-07remove an unneeded cast in createpointer()Leonardo Hernández Hernández-2/+1
2023-12-07avoid duplication of linesLeonardo Hernández Hernández-2/+1
the output state is copied when creating a output configuration head