Instead of hand rolling a dynamic array, just use a tail queue by taking
advantage of the queue(3) macros.
Simplifies the code, since there's no need to (re)allocate the array and
to keep track of its size and length.
Instead of hand rolling a dynamic array, just use a tail queue by taking
advantage of the queue(3) macros.
Simplifies the code, since there's no need to (re)allocate the array and
to keep track of its size and length.
This gives applications a chance to redraw the window contents to the actual, unchanged, window geometry.
Fixes issues with gvim, emacs, firefox, feh and many other applications.
ok marco
- Improve debug output.
- Improve code styling compliance.
- Use the X,Y,WIDTH,HEIGHT macros where applicable on ws_win and swm_region objects.
- Fix handling of _NET_MOVERESIZE_WINDOW client message.
ok marco
- Remove X11BASE and replace it with LOCALBASE, since the former is
deprecated.
- Silently ignore if included files are not found. This way we do not
depend on the FreeBSD ports tree being installed.
- Add definitions for LOCALBASE and PREFIX in case they are not given
from the included files.
- Change MANDIR to ${PREFIX}/man instead of ${PREFIX}/share/man, to
better match reality.
ok marco
Now that asprintf(3) return value is checked in conf_load(), make the
code release the memory returned by fparseln(3) and fclose(3) the
configuration file FILE pointer.
Style nit fixed while there.
ok marco
Floating windows are constrained to region on move/resize operations.
Resize center is now based on window center, instead of region center.
Fix several uninitialized/unused variable warnings.
Handle asprintf return value in conf_load.
mvws_n invokes send_to_ws(), which in turn calls focus() to focus on
the previous window before sending the current window to the desired
workspace. The TAILQ_PREV() call in focus() will fail if there are no
windows in the current workspace.
This commit adds a safeguard to focus() by ensuring that the list of
windows in the current workspace is not empty and that there is at
least one uniconified window to focus on before proceeding.
This commit also modifies send_to_ws() to set r->ws->focus to NULL if
there are no more windows in the workspace after sending the current
window to another workspace. This fixes an odd behavior where you can
"summon" a window that you have previously moved to another workspace,
even though you are in an empty workspace.
Closes FS#191
ok marco
- Refresh status bar (if name/class/title are enabled) when no window
can be focused, so that the name/class/title will be cleared.
- Handle window class/name change events to refresh the bar when appropriate.
- Move XA_WM_NORMAL_HINTS into the '#if 0' block, since the status bar
should not need to be updated for that event.
From: Splex <splecks@rejii.com>
ok marco
Older versions of dmenu (4.2.1) do not send the newline character
long with the response while newer versions (4.4.2) do, this
causes mild bugs (last char in the name of the workspace gets
lobbed off for example). Fix it by sanitizing the string in the
response handler.
Tested by me & lteo with different dmenu version.
OK lteo, marco
Pressing M-s will show a little numbered box on the top-left of each
window. You can switch focus to the desired window by typing its number
and pressing Enter. This lets you focus on a window instantly without
needing to cycle through other windows.
ok marco