From e974ac31ff1e08ca681db3c4108ae2a596e5655c Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 12 Nov 2026 02:35:57 +0000 Subject: shift the window given on the command line shift and shiftview carried an undefined window, so choosing a workspace in either mode crashed when the window was moved. They now move the first window id from the command line, which is the focused window of the focused workspace. _NET_ACTIVE_WINDOW is no longer read: its value was unused, and the pager failed to start when the property was missing. --- src/desktop-pager.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/desktop-pager.hs b/src/desktop-pager.hs index 830b32e..a689b72 100644 --- a/src/desktop-pager.hs +++ b/src/desktop-pager.hs @@ -132,10 +132,16 @@ main = do in case args of "shift" : focusWindows_ -> - ( ShiftWindowToWorkspace undefined, map readInt focusWindows_ ) + let + focusWindow : _ = map readInt focusWindows_ + in + ( ShiftWindowToWorkspace focusWindow, map readInt focusWindows_ ) "shiftview" : focusWindows_ -> - ( ShiftWindowToAndViewWorkspace undefined, map readInt focusWindows_ ) + let + focusWindow : _ = map readInt focusWindows_ + in + ( ShiftWindowToAndViewWorkspace focusWindow, map readInt focusWindows_ ) "view" : focusWindows_ -> ( ViewWorkspace, map readInt focusWindows_ ) @@ -144,8 +150,6 @@ main = do error $ "bad arguments: " <> show args - Just activeWindow <- X11.withDefaultDisplay X11.getActiveWindow - screenGeometry <- X11.withDefaultDisplay $ \display -> do let rootWindow = X11.defaultRootWindow display -- cgit v1.3.1