mirror of
https://github.com/0intro/wmii
synced 2024-12-25 04:46:51 +03:00
move some code to a better place
This commit is contained in:
parent
a0b5de8d9d
commit
2aec823caa
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user