Commit Graph
1393 Commits
Author SHA1 Message Date
Guido Cella 12a5856427 don't allocate memory for drag_icon_destroy
Not needed since dwl supports only one drag icon at a time.
2026-10-27 23:14:43 +01:00
save196 4ecb2a9df5 fix the focused border color after leaving an unmanaged client
Clients focused after an unmanaged client that wants focus didn't get
the focused border color. Regression from 87029e2.
2026-10-26 15:49:23 +02:00
Guido Cella 4953b7ea0c keep outputs off when they reconnect
Some monitors disconnect when they are turned off and reconnect shortly
after, and createmon() enabled them again. Remember the names of
the outputs turned off through output_power_management or
output_management and don't enable them in createmon().

Fixes https://codeberg.org/dwl/dwl/issues/719
2026-10-22 23:35:06 +02:00
Guido Cella 9dfaea2f79 call updatemons() when createmon() leaves an output disabled
This lets you enable it later.

Fixes afbafd5.
2026-10-22 13:31:04 +02:00
Guido Cella afbafd53ab don't crash when initializing more monitors than supported
Fixes https://codeberg.org/dwl/dwl/issues/726
2026-10-21 19:02:00 +02:00
Guido Cella 4ff9db2c40 Revert "remove zero flickering lie"
This reverts commit b1c101515a.

Fixed by d3fa329.
2026-10-20 21:26:05 +02:00
Guido Cella d3fa32993c fix flicker when arranging tiled windows
Fixes https://codeberg.org/dwl/dwl/issues/552
Fixes https://codeberg.org/dwl/dwl/issues/705

Also, floating children of fullscreen windows in floating layout now go
in LyrFS instead of LyrTile.
2026-10-20 21:23:49 +02:00
Guido Cella f08d8b3913 fix segfault when XWayland fails to initialize
Fixes https://codeberg.org/dwl/dwl/issues/1202
2026-10-19 22:57:02 +02:00
Guido Cella 90e7c722e9 remove client_is_rendered_on_mon() and client_is_stopped()
Unused since 70c33c0.
2026-10-19 21:17:43 +02:00
Guido CellaandDanD e2038450f2 fix popup positioning
Related: https://codeberg.org/dwl/dwl/pulls/1244

Co-authored-by: DanD <dandgg.ftw@gmail.com>
2026-09-29 13:54:59 +02:00
save196 4fd683cc84 fix X11 clients shifting by the border width on map
c->geom includes the border, but client_get_geometry() returns the
content position. Subtract the border, clamped to the layout edges.
2026-09-29 00:18:49 +03:00
Guido Cella d29259c26a refactor focusclient() 2026-09-28 13:18:49 +02:00
Guido Cella fccce97448 remove obsolete comment
No longer accurate since a514a92.
2026-09-28 12:19:24 +02:00
Guido Cella d9ddaba762 also make clients tiled on map
While making them tiled on the first commit was needed to fix Firefox
starting with rounded corners, if you don't set them tiled again on map
resizing mpv after starting it with a rule that makes it floating
behaves wrong.

Fixes d1ebf3c.
Fixes https://codeberg.org/dwl/dwl/issues/1247.
2026-09-26 19:31:15 +02:00
Guido Cella f1675a4800 Revert "client: do not drop configure events based on current committed size"
This reverts commit 242ffd7a75.

Removing this conditon can cause a xdg_toplevel.configure ↔
wl_surface.commit loop that uses 100% CPU.

Fixes https://codeberg.org/dwl/dwl/issues/1245
Fixes https://codeberg.org/dwl/dwl/issues/1246
2026-09-23 09:03:08 +02:00
Guido Cella a75ca79630 add missing void
Needed to compile on OpenBSD.
2026-09-22 20:42:48 +02:00
Guido Cella 87029e21c0 remove exclusive_focus variable
This is not needed because focusclient() already calls
toplevel_from_wlr_surface(seat->keyboard_state.focused_surface) and can
check if that should have exclusive focus.

When it was added there was no function to get the focused layer shell
surface in this way.
2026-09-22 14:53:00 +02:00
aloires a514a928e4 focusclient: set input method focus for layer surfaces
Focusing a layer surface only set the keyboard focus, not the text-input
focus, so layer-shell clients (launchers, menus, ...) never received a
text-input enter event and IME input didn't work. Pass the layer surface
to focusclient() and set the input method focus there, like we already do
for regular clients.
2026-09-22 16:25:29 +08:00
André Desgualdo Pereira 242ffd7a75 client: do not drop configure events based on current committed size 2026-09-21 14:35:09 -03:00
save196 f22c223cbf don't run keybindings on keyrepeat while locked 2026-09-21 17:07:38 +03:00
save196 b83881f881 don't send pointer events to clients while locked 2026-09-21 12:37:19 +03:00
save196 fa400c5d3d don't run axis bindings when locked 2026-09-21 01:06:08 +03:00
save196 40b0ae76ae bind axis to nothing by default 2026-09-21 00:07:22 +03:00
save196 2a567195e6 don't use the xdg window geometry offset as a position
It is the offset of the visible bounds inside the surface, which is not
zero for clients that pad their surface or place subsurfaces outside it,
so floating windows were mapped offset by their client side decorations.
2026-09-20 19:53:12 +03:00
Guido Cella cc23250527 bump version to 0.10-dev 2026-09-20 12:20:09 +02:00
Guido Cella 98bea2c27f add version 0.9 to the changelog v0.9 2026-09-20 11:58:38 +02:00
Guido Cella 49837e985e change unreleased to 0.8 and update it 2026-09-20 11:58:38 +02:00
julmajustus d16036e690 Fix input_method_relay double allocation
- input_method_relay is allocated inside input_method_relay_create(), which leads the extra allocation to leak memory.
2026-09-18 22:09:39 +03:00
save196 45054a34a4 always apply a minimum size of 1x1
Resizing with the mouse can make the size negative, which makes dwl
crash, and the minimum is 1 because 0 makes some X11 clients crash.
2026-09-18 10:37:27 +02:00
save196 669b26d0a9 let the focus leave an unmanaged surface
Unmanaged clients spawned by a parent window, like menus, would not
close if the user changed workspace or focused another client while the
menu was selected, because the parent was never told that it lost the
focus. This remembers the last managed client and deactivates it on a
focus change, so that it closes the menu itself.

This also fixes a regression introduced by f6e3a28, where menus would
close immediately after being opened.
2026-09-18 09:17:40 +02:00
save196 e451862544 follow the geometry of unmanaged clients and fix formatting 2026-09-17 17:35:49 +00:00
save196 b3223b15e9 fix capturing hidden toplevels 2026-09-17 16:46:41 +00:00
Guido Cella 1fe1b4e66e show popups in fullscreen Xwayland apps
The dialogs opened by clicking items in Xwyland applications' toolbars
are unmanaged clients, so placing them in LyrFloat drew them below their
source client in LyrFS when it is fullscreened.

Add a new dedicated layer for unamanged clients to fix it. Don't put
them in LyrFS to prevent the regular fullscreen client from hiding
unmanaged ones, e.g. by opening dmenu and then clicking the regular
client.

Fixes https://codeberg.org/dwl/dwl/issues/556
2026-09-16 12:47:52 +02:00
Guido Cella 1dae5ba3ed size hints can be -1 2026-09-16 11:50:36 +02:00
Guido Cella 433c325fb2 fix a use-after-free
Prevent a use-after-free when closing a nested dwl with Ctrl+c.

It happened because cleanup() → input_method_relay_finish() frees
input_method_relay, and then closemon() → focusclient() →
input_method_relay_set_focus() uses relay->surface.
2026-09-15 23:29:50 +02:00
Guido Cella 6013835337 keep the focused border color of the old client in certain cases
When focusing an unmanaged client (like dmenu) or a layer shell surface
(like wmenu) keep the focused border color of the regular client, but
still deactivate it. This is consistent with dwm and sway.

This was already done for unmanaged clients but not for layer shell
surfaces.

This is not perfect because you can press MODKEY+j/k or move the cursor
while a program like dmenu is focused and have 2 clients with focused
border color after closing dmenu. But this doesn't work well even in
sway where if you change focus while dmenu is open you can longer focus
it, and after closing a layer shell surface with on-demand keyboard
interactivity all toplevels have the focused border color, so this will
do for now.
2026-09-15 22:17:24 +02:00
Guido Cella f6e3a2826e deactivate the old client when the new one wants focus
I see no issue with winecfg after removing this condition, so I assume
it was fixed upstream.
2026-09-15 22:16:35 +02:00
Guido Cella aa0c1659d3 Reapply "use modifier-independent key symbols in keybindings"
This reverts commit 0f8630282d.
2026-09-15 21:23:47 +02:00
Guido Cella bab3fdadf3 don't run keybindings twice when the shift keysym is the same
For keys like F1-F12 the keysym with the shift is the same as without.
Avoid running keybindings bound to these keys twice.
2026-09-15 21:22:41 +02:00
Guido Cella 0f8630282d Revert "use modifier-independent key symbols in keybindings"
This reverts commit f9c644f0b0.
2026-09-15 20:57:28 +02:00
Guido Cella 4de32d2d5c Reapply "respect size hints"
This reverts commit 31bf1cbaf6.

Fixes https://codeberg.org/dwl/dwl/issues/105
Fixes https://codeberg.org/dwl/dwl/issues/634
Fixes https://codeberg.org/dwl/dwl/issues/1171
2026-09-15 20:03:28 +02:00
Guido Cella 36c80aff03 Revert "don't resize on commit"
This reverts commit 498a0e605c.

Without resizing on every commit the top left of firefox is cropped.
2026-09-15 15:24:45 +02:00
Guido Cella 68c6319e3f Revert "reduce nesting in commitnotify()"
This reverts commit c824886b8c.
2026-09-15 15:24:27 +02:00
Guido Cella c824886b8c reduce nesting in commitnotify() 2026-09-15 12:07:13 +02:00
Guido Cella 498a0e605c don't resize on commit
Fixes https://codeberg.org/dwl/dwl/issues/1229
Reverts 32e66f4

This could be called only on the initial_commit, but it was added to fix
https://github.com/djpohly/dwl/issues/515 which I can't reproduce after
removing it, so let's try to remove it completely.
2026-09-15 12:06:35 +02:00
Guido Cella fec0699985 make client_set_size() return void
The return value is unused since the previous commit.
2026-09-15 12:06:32 +02:00
Guido Cella e7f185ed3e remove c->resize
Unused since 70c33c0.
2026-09-15 09:49:25 +02:00
Andrea ChiavazzaandGuido Cella f9c644f0b0 use modifier-independent key symbols in keybindings
Co-authored-by: Guido Cella <guido@guidocella.xyz>
2026-09-14 17:53:35 +02:00
Leonardo Hernández Hernández dc9a860191 use the new output swapchain manager in outputmgrapplyortest() 2026-09-14 10:45:33 +02:00
Guido Cella d1ebf3c985 fix firefox opening with rounded corners
Fixes https://codeberg.org/dwl/dwl/issues/1169

The c->isfloating check is needed to have the correct floating window
size with e.g. alacritty -o window.dimensions.columns=15
window.dimensions.lines=10.
2026-09-14 10:42:59 +02:00