move some code to a better place

This commit is contained in:
Sander van Dijk 2006-01-22 20:19:45 +01:00
parent a0b5de8d9d
commit 2aec823caa

View File

@ -128,17 +128,19 @@ destroy_page(Page * p)
npages--; npages--;
XChangeProperty(dpy, root, net_atoms[NET_NUMBER_OF_DESKTOPS], XA_CARDINAL, XChangeProperty(dpy, root, net_atoms[NET_NUMBER_OF_DESKTOPS], XA_CARDINAL,
32, PropModeReplace, (unsigned char *) &npages, 1); 32, PropModeReplace, (unsigned char *) &npages, 1);
focus_page(newselpage); if(newselpage)
focus_page(newselpage);
else {
invoke_wm_event(def[WM_EVENT_PAGE_UPDATE]);
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
}
} }
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) {