458 |
XGetWMNormalHints (dpy, w, c->size, &dummy); |
XGetWMNormalHints (dpy, w, c->size, &dummy); |
459 |
XGetWindowAttributes (dpy, w, &attr); |
XGetWindowAttributes (dpy, w, &attr); |
460 |
c->window = w; |
c->window = w; |
461 |
if (typeAbove(c->window)) |
if (typeAbove (c->window)) |
462 |
c->above = True; |
c->above = True; |
463 |
else |
else |
464 |
c->above = False; |
c->above = False; |
469 |
c->border_width = attr.border_width; |
c->border_width = attr.border_width; |
470 |
for (i = 0; i < BUTTON_COUNT; i++) |
for (i = 0; i < BUTTON_COUNT; i++) |
471 |
c->button_pressed[i] = False; |
c->button_pressed[i] = False; |
472 |
getNetWMStrut(w, margins, c->margins); |
getNetWMStrut (w, margins, c->margins); |
473 |
if (!getGnomeHint (w, win_hints, &c->win_hints)) |
if (!getGnomeHint (w, win_hints, &c->win_hints)) |
474 |
c->win_hints = 0; |
c->win_hints = 0; |
475 |
if (!getGnomeHint (w, win_state, &c->win_state)) |
if (!getGnomeHint (w, win_state, &c->win_state)) |
599 |
if (getWMState (c->window) != IconicState) |
if (getWMState (c->window) != IconicState) |
600 |
{ |
{ |
601 |
clientShow (c, True); |
clientShow (c, True); |
602 |
if (focus_new && (!(c->win_hints & WIN_HINTS_SKIP_FOCUS) || !c->non_focusing)) |
if (focus_new |
603 |
|
&& (!(c->win_hints & WIN_HINTS_SKIP_FOCUS) || !c->non_focusing)) |
604 |
{ |
{ |
605 |
clientSetFocus (c, True); |
clientSetFocus (c, True); |
606 |
} |
} |
621 |
printf ("unframing client (%#lx)\n", c->window); |
printf ("unframing client (%#lx)\n", c->window); |
622 |
#endif |
#endif |
623 |
|
|
624 |
delNetWMStrut(margins, c->margins); |
delNetWMStrut (margins, c->margins); |
625 |
clientGravitate (c, REMOVE); |
clientGravitate (c, REMOVE); |
626 |
clientUngrabKeys (c); |
clientUngrabKeys (c); |
627 |
XSetWindowBorderWidth (dpy, c->window, c->border_width); |
XSetWindowBorderWidth (dpy, c->window, c->border_width); |
788 |
printf ("entering clientRaise\n"); |
printf ("entering clientRaise\n"); |
789 |
#endif |
#endif |
790 |
|
|
791 |
if(!c) |
if (!c) |
792 |
return; |
return; |
793 |
|
|
794 |
if (c->win_hints & WIN_HINTS_SKIP_FOCUS || c->non_focusing) |
if (c->win_hints & WIN_HINTS_SKIP_FOCUS || c->non_focusing) |
795 |
{ |
{ |
796 |
#ifdef DEBUG |
#ifdef DEBUG |
1049 |
if (tmp->focus) |
if (tmp->focus) |
1050 |
{ |
{ |
1051 |
tmp->focus = False; |
tmp->focus = False; |
1052 |
frameDraw(tmp); |
frameDraw (tmp); |
1053 |
} |
} |
1054 |
} |
} |
1055 |
c->focus = True; |
c->focus = True; |
1064 |
if (tmp->focus) |
if (tmp->focus) |
1065 |
{ |
{ |
1066 |
tmp->focus = False; |
tmp->focus = False; |
1067 |
frameDraw(tmp); |
frameDraw (tmp); |
1068 |
} |
} |
1069 |
} |
} |
1070 |
} |
} |
1074 |
clientGetFocus () |
clientGetFocus () |
1075 |
{ |
{ |
1076 |
Client *c; |
Client *c; |
1077 |
// Window w; |
// Window w; |
1078 |
int i; |
int i; |
1079 |
|
|
1080 |
#ifdef DEBUG |
#ifdef DEBUG |
1084 |
for (c = clients, i = 0; i < client_count; c = c->next, i++) |
for (c = clients, i = 0; i < client_count; c = c->next, i++) |
1085 |
if (c->focus && c->win_workspace == workspace) |
if (c->focus && c->win_workspace == workspace) |
1086 |
return c; |
return c; |
1087 |
// XGetInputFocus (dpy, &w, &dummy); |
// XGetInputFocus (dpy, &w, &dummy); |
1088 |
// return clientGetFromWindow (w, WINDOW); |
// return clientGetFromWindow (w, WINDOW); |
1089 |
return NULL; |
return NULL; |
1090 |
} |
} |
1091 |
|
|
1220 |
new_ws = workspace - 1; |
new_ws = workspace - 1; |
1221 |
switch_ws = 1; |
switch_ws = 1; |
1222 |
XWarpPointer (dpy, None, root, 0, 0, 0, 0, |
XWarpPointer (dpy, None, root, 0, 0, 0, 0, |
1223 |
XDisplayWidth (dpy, screen) - 11, msy); |
XDisplayWidth (dpy, screen) - 11, msy); |
1224 |
ev.xmotion.x_root = XDisplayWidth (dpy, screen) - 11; |
ev.xmotion.x_root = XDisplayWidth (dpy, screen) - 11; |
1225 |
} |
} |
1226 |
else if (msx == XDisplayWidth (dpy, screen) - 1 && |
else if (msx == XDisplayWidth (dpy, screen) - 1 && |
1360 |
wc.y = c->y; |
wc.y = c->y; |
1361 |
clientConfigure (c, &wc, CWX | CWY); |
clientConfigure (c, &wc, CWX | CWY); |
1362 |
} |
} |
1363 |
if(switch_ws) { |
if (switch_ws) |
1364 |
workspaceSwitch (new_ws, c); |
{ |
1365 |
clientRaise(c); |
workspaceSwitch (new_ws, c); |
1366 |
} |
clientRaise (c); |
1367 |
|
} |
1368 |
} |
} |
1369 |
else if (!use_keys && ev.type == ButtonRelease) |
else if (!use_keys && ev.type == ButtonRelease) |
1370 |
moving = False; |
moving = False; |
1841 |
printf ("entering clientInBorderlessList\n"); |
printf ("entering clientInBorderlessList\n"); |
1842 |
#endif |
#endif |
1843 |
|
|
1844 |
class_res = XAllocClassHint(); |
class_res = XAllocClassHint (); |
1845 |
|
|
1846 |
if(!class_res) |
if (!class_res) |
1847 |
return False; |
return False; |
1848 |
|
|
1849 |
if (XGetClassHint (dpy, c->window, class_res) && class_res->res_name) |
if (XGetClassHint (dpy, c->window, class_res) && class_res->res_name) |
1885 |
/***This must remain at the end of the file.**************************************************** |
/***This must remain at the end of the file.**************************************************** |
1886 |
* vi:set sw=2 ts=2 cindent cinoptions={1s,>2s,^-1s,n-1s foldmethod=marker foldmarker=«««,»»»: * |
* vi:set sw=2 ts=2 cindent cinoptions={1s,>2s,^-1s,n-1s foldmethod=marker foldmarker=«««,»»»: * |
1887 |
***********************************************************************************************/ |
***********************************************************************************************/ |
|
|
|