Closed mihirlad55 closed 4 years ago
This was caused by a conflict between the emptyview patch and pertag patch. The pertag patch overrode the emptyview patch causing the focus
and arrange
functions to not be called if the toggleview
function results in no tags selected. The reason this was working fine with key bindings is the buttonpress
function in dwm calls focus
and arrange
regardless.
For future reference, see https://github.com/mihirlad55/dwm/commit/e2650a679bed382ef921234bc67aac91c68c87f6
That was actually not the main issue. The main issue was the XMoveWindow
function call that is supposed to take place in showhide
would not be flushed to the XServer. Normally this wouldn't be a problem because an XEvent would being received would trigger a flush or XSync
would be called from restack
which would manually flush the events. However, if no client is selected, the restack
function returns before XSync
is called. This would result in the client still being visible since the XMoveEvent
was not being flushed to the server until another XEvent took place that causes the queue to be flushed.
There are several solutions to this problem:
I believe, this is mainly an issue of an unforeseen edge case. Though, an empty view is not something dwm was necessarily designed to allow by default. I think this would be best classified as an unforeseen edge case of the emptyview patch, since the restack
function would otherwise never need to XSync if no clients are selected unless there was an empty view.
Right-clicking the only tag in view to toggle it out of view doesn't take effect until the cursor hovers over a client. This might have something to do with the toggleview command not rearranging the view.