mirror of
https://github.com/0intro/wmii
synced 2025-02-01 14:57:11 +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 == pages) {
|
||||||
if(p->next)
|
if(p->next) {
|
||||||
p->next->prev = nil;
|
p->next->prev = nil;
|
||||||
pages = p->next;
|
pages = p->next;
|
||||||
pages->index = 0;
|
pages->index = 0;
|
||||||
|
} else
|
||||||
|
pages = nil;
|
||||||
} else {
|
} else {
|
||||||
p->prev->next = p->next;
|
p->prev->next = p->next;
|
||||||
if(p->next)
|
if(p->next)
|
||||||
@ -132,8 +134,11 @@ destroy_page(Page * p)
|
|||||||
void
|
void
|
||||||
focus_page(Page * p)
|
focus_page(Page * p)
|
||||||
{
|
{
|
||||||
if(!p)
|
if(!p) {
|
||||||
|
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
|
||||||
|
invoke_wm_event(def[WM_EVENT_PAGE_UPDATE]);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if((p != selpage)) {
|
if((p != selpage)) {
|
||||||
if(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}' ^\
|
'text=`{wmiir read /wm/sel/layout/sel/frame/sel/name}' ^\
|
||||||
'wmiir write /bar/'^$clab^'/data $"text'
|
'wmiir write /bar/'^$clab^'/data $"text'
|
||||||
wmiir write /wm/event/pageupdate \
|
wmiir write /wm/event/pageupdate \
|
||||||
'wmiir write /bar/'^$plab^'/data `{wmiir read /wm/sel/name} &&' ^\
|
'text=`{wmiir read /wm/sel/name}; wmiir write /bar/'^$plab^'/data $"text &&' ^\
|
||||||
'wmiir write /bar/'^$klab^'/data `{wmiir read /keys/lookup|sed ''s|/mode/||''} && ' ^\
|
'text=`{wmiir read /keys/lookup|sed ''s|/mode/||''}; wmiir write /bar/'^$klab^'/data $"text && ' ^\
|
||||||
'wmiir write /bar/'^$llab^'/data `{wmiir read /wm/sel/layout/sel/name}'
|
'text=`{wmiir read /wm/sel/layoutname}; wmiir write /bar/'^$llab^'/data $"text'
|
||||||
|
|
||||||
for(page in `{wmiir read /wm | grep '^[0-9]'}) {
|
for(page in `{wmiir read /wm | grep '^[0-9]'}) {
|
||||||
framesconf /wm/$page/layout/float/frame
|
framesconf /wm/$page/layout/float/frame
|
||||||
|
Loading…
x
Reference in New Issue
Block a user