mirror of
https://github.com/0intro/wmii
synced 2025-01-20 17:19:21 +03:00
cure wmiiwm sudden death on removal of last remaining page
This commit is contained in:
parent
a8f1f17fb8
commit
f08f943282
@ -103,10 +103,12 @@ destroy_page(Page * p)
|
||||
}
|
||||
|
||||
if(p == pages) {
|
||||
if(p->next)
|
||||
if(p->next) {
|
||||
p->next->prev = nil;
|
||||
pages = p->next;
|
||||
pages->index = 0;
|
||||
pages = p->next;
|
||||
pages->index = 0;
|
||||
} else
|
||||
pages = nil;
|
||||
} else {
|
||||
p->prev->next = p->next;
|
||||
if(p->next)
|
||||
@ -132,8 +134,11 @@ destroy_page(Page * p)
|
||||
void
|
||||
focus_page(Page * p)
|
||||
{
|
||||
if(!p)
|
||||
if(!p) {
|
||||
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
|
||||
invoke_wm_event(def[WM_EVENT_PAGE_UPDATE]);
|
||||
return;
|
||||
}
|
||||
|
||||
if((p != selpage)) {
|
||||
if(selpage) {
|
||||
|
6
rc/wmiirc
Normal file → Executable file
6
rc/wmiirc
Normal file → Executable file
@ -111,9 +111,9 @@ wmiir write /wm/event/clientupdate \
|
||||
'text=`{wmiir read /wm/sel/layout/sel/frame/sel/name}' ^\
|
||||
'wmiir write /bar/'^$clab^'/data $"text'
|
||||
wmiir write /wm/event/pageupdate \
|
||||
'wmiir write /bar/'^$plab^'/data `{wmiir read /wm/sel/name} &&' ^\
|
||||
'wmiir write /bar/'^$klab^'/data `{wmiir read /keys/lookup|sed ''s|/mode/||''} && ' ^\
|
||||
'wmiir write /bar/'^$llab^'/data `{wmiir read /wm/sel/layout/sel/name}'
|
||||
'text=`{wmiir read /wm/sel/name}; wmiir write /bar/'^$plab^'/data $"text &&' ^\
|
||||
'text=`{wmiir read /keys/lookup|sed ''s|/mode/||''}; wmiir write /bar/'^$klab^'/data $"text && ' ^\
|
||||
'text=`{wmiir read /wm/sel/layoutname}; wmiir write /bar/'^$llab^'/data $"text'
|
||||
|
||||
for(page in `{wmiir read /wm | grep '^[0-9]'}) {
|
||||
framesconf /wm/$page/layout/float/frame
|
||||
|
Loading…
Reference in New Issue
Block a user