/[oroborus]/oroborus/src/client.c
ViewVC logotype

Diff of /oroborus/src/client.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.49 by dreamind, Fri Feb 14 01:05:27 2003 UTC revision 1.50 by dreamind, Fri Feb 14 01:10:30 2003 UTC
# Line 458  clientFrame (Window w) Line 458  clientFrame (Window w)
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;
# Line 469  clientFrame (Window w) Line 469  clientFrame (Window w)
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))
# Line 599  clientFrame (Window w) Line 599  clientFrame (Window w)
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                                  }                                  }
# Line 620  clientUnframe (Client * c, int remap) Line 621  clientUnframe (Client * c, int remap)
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);
# Line 787  clientRaise (Client * c) Line 788  clientRaise (Client * c)
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
# Line 1048  clientSetFocus (Client * c, int sort) Line 1049  clientSetFocus (Client * c, int sort)
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;
# Line 1063  clientSetFocus (Client * c, int sort) Line 1064  clientSetFocus (Client * c, int sort)
1064                                                  if (tmp->focus)                                                  if (tmp->focus)
1065                                                          {                                                          {
1066                                                                  tmp->focus = False;                                                                  tmp->focus = False;
1067                                                                  frameDraw(tmp);                                                                  frameDraw (tmp);
1068                                                          }                                                          }
1069                                          }                                          }
1070                  }                  }
# Line 1073  Client * Line 1074  Client *
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
# Line 1083  clientGetFocus () Line 1084  clientGetFocus ()
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    
# Line 1219  clientMove (Client * c, XEvent * e) Line 1220  clientMove (Client * c, XEvent * e)
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 &&
# Line 1359  clientMove (Client * c, XEvent * e) Line 1360  clientMove (Client * c, XEvent * e)
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;
# Line 1839  clientInBorderlessList (Client * c) Line 1841  clientInBorderlessList (Client * c)
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)
# Line 1883  clientInBorderlessList (Client * c) Line 1885  clientInBorderlessList (Client * c)
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   ***********************************************************************************************/   ***********************************************************************************************/
   

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26