Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        ewin-ops.c ewin-ops.h ewins.c ewins.h ewmh.c gnome.c iconify.c 
        ipc.c menus.c mod-misc.c pager.c snaps.c windowmatch.c 


Log Message:
Action source handling - part 1. Mostly renaming and shuffling around.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewin-ops.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -3 -r1.76 -r1.77
--- ewin-ops.c  12 Nov 2005 15:36:44 -0000      1.76
+++ ewin-ops.c  12 Nov 2005 17:51:10 -0000      1.77
@@ -34,6 +34,9 @@
 #include <math.h>
 
 static const WinOp  winops[] = {
+   {"border", 2, 1, 0, EWIN_OP_BORDER},
+   {"title", 2, 1, 1, EWIN_OP_TITLE},
+
    {"close", 2, 1, 0, EWIN_OP_CLOSE},
    {"kill", 0, 1, 0, EWIN_OP_KILL},
    {"iconify", 2, 1, 1, EWIN_OP_ICONIFY},
@@ -41,38 +44,47 @@
    {"shadow", 0, 1, 1, EWIN_OP_SHADOW},        /* Place before "shade" */
    {"shade", 2, 1, 1, EWIN_OP_SHADE},
    {"stick", 2, 1, 1, EWIN_OP_STICK},
-   {"fixedpos", 0, 1, 1, EWIN_OP_FIXED_POS},
-   {"fixedsize", 0, 1, 1, EWIN_OP_FIXED_SIZE},
-   {"never_use_area", 0, 1, 1, EWIN_OP_NEVER_USE_AREA},
-   {"focusclick", 0, 1, 1, EWIN_OP_FOCUS_CLICK},
-   {"neverfocus", 0, 1, 1, EWIN_OP_FOCUS_NEVER},
-   {"no_button_grabs", 0, 1, 1, EWIN_OP_NO_BUTTON_GRABS},
-   {"title", 2, 1, 1, EWIN_OP_TITLE},
-   {"toggle_width", 0, 1, 0, EWIN_OP_MAX_WIDTH},
-   {"tw", 2, 1, 0, EWIN_OP_MAX_WIDTH},
-   {"toggle_height", 0, 1, 0, EWIN_OP_MAX_HEIGHT},
-   {"th", 0, 1, 0, EWIN_OP_MAX_HEIGHT},
-   {"toggle_size", 0, 1, 0, EWIN_OP_MAX_SIZE},
-   {"ts", 2, 1, 0, EWIN_OP_MAX_SIZE},
-   {"raise", 2, 1, 0, EWIN_OP_RAISE},
-   {"lower", 2, 1, 0, EWIN_OP_LOWER},
-   {"layer", 2, 1, 1, EWIN_OP_LAYER},
-   {"border", 2, 1, 0, EWIN_OP_BORDER},
+   {"focus", 2, 1, 0, EWIN_OP_FOCUS},
+
    {"desk", 2, 1, 1, EWIN_OP_DESK},
    {"area", 2, 1, 1, EWIN_OP_AREA},
    {"move", 2, 1, 1, EWIN_OP_MOVE},
-   {"resize", 0, 1, 1, EWIN_OP_SIZE},
+   {"size", 2, 1, 1, EWIN_OP_SIZE},
    {"sz", 2, 1, 1, EWIN_OP_SIZE},
    {"move_relative", 0, 1, 0, EWIN_OP_MOVE_REL},
    {"mr", 2, 1, 0, EWIN_OP_MOVE_REL},
    {"resize_relative", 0, 1, 0, EWIN_OP_SIZE_REL},
    {"sr", 2, 1, 0, EWIN_OP_SIZE_REL},
-   {"focus", 2, 1, 0, EWIN_OP_FOCUS},
+
+   {"toggle_width", 0, 1, 0, EWIN_OP_MAX_WIDTH},
+   {"tw", 2, 1, 0, EWIN_OP_MAX_WIDTH},
+   {"toggle_height", 0, 1, 0, EWIN_OP_MAX_HEIGHT},
+   {"th", 0, 1, 0, EWIN_OP_MAX_HEIGHT},
+   {"toggle_size", 0, 1, 0, EWIN_OP_MAX_SIZE},
+   {"ts", 2, 1, 0, EWIN_OP_MAX_SIZE},
    {"fullscreen", 2, 1, 1, EWIN_OP_FULLSCREEN},
-   {"skiplists", 4, 1, 1, EWIN_OP_SKIP_LISTS},
    {"zoom", 2, 1, 0, EWIN_OP_ZOOM},
+
+   {"layer", 2, 1, 1, EWIN_OP_LAYER},
+   {"raise", 2, 1, 0, EWIN_OP_RAISE},
+   {"lower", 2, 1, 0, EWIN_OP_LOWER},
+
    {"snap", 0, 1, 0, EWIN_OP_SNAP},
+
+   {"focusclick", 0, 1, 1, EWIN_OP_FOCUS_CLICK},
+   {"never_use_area", 0, 1, 1, EWIN_OP_NEVER_USE_AREA},
+   {"no_button_grabs", 0, 1, 1, EWIN_OP_NO_BUTTON_GRABS},
+   {"skiplists", 4, 1, 1, EWIN_OP_SKIP_LISTS},
+
+   {"no_app_move", 0, 1, 1, EWIN_OP_INH_APP_MOVE},
+   {"no_app_size", 0, 1, 1, EWIN_OP_INH_APP_SIZE},
+   {"no_user_close", 0, 1, 1, EWIN_OP_INH_USER_CLOSE},
+   {"no_user_move", 0, 1, 1, EWIN_OP_INH_USER_MOVE},
+   {"no_user_size", 0, 1, 1, EWIN_OP_INH_USER_SIZE},
+   {"no_wm_focus", 0, 1, 1, EWIN_OP_INH_WM_FOCUS},
+
    {"noredir", 4, 1, 1, EWIN_OP_NO_REDIRECT},
+
    {NULL, 0, 0, 0, EWIN_OP_INVALID}    /* Terminator */
 };
 
@@ -1341,7 +1353,6 @@
        w = ewin->lw;
        h = ewin->lh;
        GetOnScreenPos(x, y, w, h, &x, &y);
-       ewin->props.fixedpos = 0;       /* Yeah - well */
        b = ewin->normal_border;
        EwinBorderSetTo(ewin, b);
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewin-ops.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewin-ops.h  25 Aug 2005 22:28:48 -0000      1.4
+++ ewin-ops.h  12 Nov 2005 17:51:11 -0000      1.5
@@ -26,38 +26,51 @@
 typedef enum
 {
    EWIN_OP_INVALID,
+
+   EWIN_OP_BORDER,
+   EWIN_OP_TITLE,
+
    EWIN_OP_CLOSE,
    EWIN_OP_KILL,
    EWIN_OP_ICONIFY,
-   EWIN_OP_OPACITY,
-   EWIN_OP_SHADOW,
    EWIN_OP_SHADE,
    EWIN_OP_STICK,
-   EWIN_OP_FIXED_POS,
-   EWIN_OP_FIXED_SIZE,
-   EWIN_OP_NEVER_USE_AREA,
-   EWIN_OP_FOCUS_CLICK,
-   EWIN_OP_FOCUS_NEVER,
-   EWIN_OP_NO_BUTTON_GRABS,
-   EWIN_OP_TITLE,
-   EWIN_OP_MAX_WIDTH,
-   EWIN_OP_MAX_HEIGHT,
-   EWIN_OP_MAX_SIZE,
-   EWIN_OP_RAISE,
-   EWIN_OP_LOWER,
-   EWIN_OP_LAYER,
-   EWIN_OP_BORDER,
+   EWIN_OP_FOCUS,
+
    EWIN_OP_DESK,
    EWIN_OP_AREA,
    EWIN_OP_MOVE,
    EWIN_OP_SIZE,
    EWIN_OP_MOVE_REL,
    EWIN_OP_SIZE_REL,
-   EWIN_OP_FOCUS,
+
+   EWIN_OP_MAX_WIDTH,
+   EWIN_OP_MAX_HEIGHT,
+   EWIN_OP_MAX_SIZE,
    EWIN_OP_FULLSCREEN,
-   EWIN_OP_SKIP_LISTS,
    EWIN_OP_ZOOM,
+
+   EWIN_OP_LAYER,
+   EWIN_OP_RAISE,
+   EWIN_OP_LOWER,
+
+   EWIN_OP_OPACITY,
+
    EWIN_OP_SNAP,
+
+   EWIN_OP_FOCUS_CLICK,
+   EWIN_OP_NEVER_USE_AREA,
+   EWIN_OP_NO_BUTTON_GRABS,
+   EWIN_OP_SKIP_LISTS,
+
+   EWIN_OP_INH_APP_MOVE,
+   EWIN_OP_INH_APP_SIZE,
+   EWIN_OP_INH_USER_CLOSE,
+   EWIN_OP_INH_USER_MOVE,
+   EWIN_OP_INH_USER_SIZE,
+   EWIN_OP_INH_WM_FOCUS,
+
+   EWIN_OP_SHADOW,
    EWIN_OP_NO_REDIRECT,
 } winop_e;
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -3 -r1.126 -r1.127
--- ewins.c     6 Nov 2005 14:35:26 -0000       1.126
+++ ewins.c     12 Nov 2005 17:51:11 -0000      1.127
@@ -642,15 +642,17 @@
 {
    ewin->state.inhibit_actions = ewin->props.no_actions;
    ewin->state.inhibit_focus = !ewin->icccm.need_input ||
-      ewin->props.never_focus || ewin->state.iconified;
+      EwinInhGetWM(ewin, focus) || ewin->state.iconified;
 
    ewin->state.no_border = ewin->props.no_border || ewin->state.docked ||
       (ewin->mwm.valid && !ewin->mwm.decor_title && !ewin->mwm.decor_border);
 
-   ewin->state.inhibit_move = ewin->props.fixedpos || ewin->state.fullscreen;
-   ewin->state.inhibit_resize = ewin->props.fixedsize || ewin->state.shaded ||
+   ewin->state.inhibit_move =
+      EwinInhGetUser(ewin, move) || ewin->state.fullscreen;
+   ewin->state.inhibit_resize =
+      EwinInhGetUser(ewin, size) || ewin->state.shaded ||
       ewin->state.fullscreen;
-   ewin->state.inhibit_iconify = ewin->props.never_iconify;
+   ewin->state.inhibit_iconify = EwinInhGetWM(ewin, iconify);
    ewin->state.inhibit_shade = ewin->state.no_border || ewin->state.fullscreen;
    ewin->state.inhibit_stick = 0;
    ewin->state.inhibit_max_hor =
@@ -660,7 +662,8 @@
    ewin->state.inhibit_fullscreeen =
       ewin->state.inhibit_move || ewin->state.inhibit_resize;
    ewin->state.inhibit_change_desk = 0;
-   ewin->state.inhibit_close = 0;
+   ewin->state.inhibit_close = EwinInhGetApp(ewin, close) ||
+      EwinInhGetUser(ewin, close);
 }
 
 void
@@ -1173,21 +1176,27 @@
        winrel = 0;
        /* This is shady - some clients send root coords, some use the
         * ICCCM ones sent by us */
+       if (!EwinInhGetApp(ewin, move))
+         {
 #if 1                          /* FIXME - ??? */
-       if (ev->xconfigurerequest.value_mask & CWX)
-          x = ev->xconfigurerequest.x;
-       if (ev->xconfigurerequest.value_mask & CWY)
-          y = ev->xconfigurerequest.y;
+            if (ev->xconfigurerequest.value_mask & CWX)
+               x = ev->xconfigurerequest.x;
+            if (ev->xconfigurerequest.value_mask & CWY)
+               y = ev->xconfigurerequest.y;
 #else
-       if (ev->xconfigurerequest.value_mask & CWX)
-          x = ev->xconfigurerequest.x - EoGetX(EoGetDesk(ewin));
-       if (ev->xconfigurerequest.value_mask & CWY)
-          y = ev->xconfigurerequest.y - EoGetY(EoGetDesk(ewin));
+            if (ev->xconfigurerequest.value_mask & CWX)
+               x = ev->xconfigurerequest.x - EoGetX(EoGetDesk(ewin));
+            if (ev->xconfigurerequest.value_mask & CWY)
+               y = ev->xconfigurerequest.y - EoGetY(EoGetDesk(ewin));
 #endif
-       if (ev->xconfigurerequest.value_mask & CWWidth)
-          w = ev->xconfigurerequest.width;
-       if (ev->xconfigurerequest.value_mask & CWHeight)
-          h = ev->xconfigurerequest.height;
+         }
+       if (!EwinInhGetApp(ewin, move))
+         {
+            if (ev->xconfigurerequest.value_mask & CWWidth)
+               w = ev->xconfigurerequest.width;
+            if (ev->xconfigurerequest.value_mask & CWHeight)
+               h = ev->xconfigurerequest.height;
+         }
        if (ev->xconfigurerequest.value_mask & CWSibling)
           winrel = ev->xconfigurerequest.above;
        if (ev->xconfigurerequest.value_mask & CWStackMode)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- ewins.h     5 Nov 2005 17:12:53 -0000       1.27
+++ ewins.h     12 Nov 2005 17:51:11 -0000      1.28
@@ -35,6 +35,26 @@
 
 struct _snapshot;
 
+typedef struct
+{
+   unsigned int        all:32;
+   struct
+   {
+      unsigned            close:1;     /*  AU */
+      unsigned            focus:1;     /* WA  */
+      unsigned            iconify:1;   /* W U */
+      unsigned            move:1;      /*  AU */
+      unsigned            size:1;      /*  AU */
+   } b;
+} EwinInhibit;
+
+#define EwinInhGetApp(ewin, item)      (ewin->inh_app.b.item)
+#define EwinInhSetApp(ewin, item, on)  ewin->inh_app.b.item = (on)
+#define EwinInhGetUser(ewin, item)     (ewin->inh_user.b.item)
+#define EwinInhSetUser(ewin, item, on) ewin->inh_user.b.item = (on)
+#define EwinInhGetWM(ewin, item)       (ewin->inh_wm.b.item)
+#define EwinInhSetWM(ewin, item, on)   ewin->inh_wm.b.item = (on)
+
 struct _ewin
 {
    EObj                o;
@@ -67,6 +87,7 @@
       unsigned            placed:1;
       unsigned            iconified:1;
       unsigned            docked:1;
+
       unsigned            click_grab_isset:1;
       unsigned            maximized_horz:1;
       unsigned            maximized_vert:1;
@@ -99,27 +120,25 @@
    } state;
    struct
    {
-      char                fixedpos;
-      char                fixedsize;
-      char                never_use_area;
-      char                ignorearrange;
-      char                skip_ext_task;
-      char                skip_ext_pager;
-      char                skip_focuslist;
-      char                skip_winlist;
-      char                focusclick;  /* Click to focus */
-      char                never_focus; /* Never focus */
-      char                no_button_grabs;
-      char                no_actions;
+      unsigned            never_use_area:1;
+      unsigned            ignorearrange:1;
+      unsigned            skip_ext_task:1;
+      unsigned            skip_ext_pager:1;
+      unsigned            skip_focuslist:1;
+      unsigned            skip_winlist:1;
+      unsigned            focusclick:1;        /* Click to focus */
+      unsigned            no_button_grabs:1;
+      unsigned            no_actions:1;
       unsigned            no_resize_h:1;
       unsigned            no_resize_v:1;
       unsigned            donthide:1;  /* Don't hide on show desktop */
       unsigned            vroot:1;     /* Virtual root window */
       unsigned            autosave:1;
       unsigned            no_border:1; /* Never apply border */
-      unsigned            never_iconify:1;     /* Never iconify */
-      unsigned            no_shadow:1; /* Never apply shadow */
    } props;
+   EwinInhibit         inh_app;
+   EwinInhibit         inh_user;
+   EwinInhibit         inh_wm;
    struct
    {
       char               *wm_name;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -3 -r1.94 -r1.95
--- ewmh.c      30 Oct 2005 19:40:49 -0000      1.94
+++ ewmh.c      12 Nov 2005 17:51:11 -0000      1.95
@@ -569,7 +569,8 @@
        ewin->focusclick = 1;
 #endif
        ewin->props.skip_focuslist = 1;
-       ewin->props.fixedpos = 1;
+       EwinInhSetUser(ewin, move, 1);
+       EwinInhSetUser(ewin, size, 1);
        ewin->props.donthide = 1;
        EwinSetBorderByName(ewin, "BORDERLESS");
      }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/gnome.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- gnome.c     27 Oct 2005 23:18:35 -0000      1.58
+++ gnome.c     12 Nov 2005 17:51:11 -0000      1.59
@@ -366,7 +366,7 @@
    if (flags & WIN_STATE_STICKY)
       EoSetSticky(ewin, 1);
    if (flags & WIN_STATE_FIXED_POSITION)
-      ewin->props.fixedpos = 1;
+      EwinInhSetUser(ewin, move, 1);
    if (flags & WIN_STATE_ARRANGE_IGNORE)
       ewin->props.ignorearrange = 1;
 }
@@ -467,7 +467,7 @@
       val |= WIN_STATE_STICKY;
    if (ewin->state.shaded)
       val |= WIN_STATE_SHADED;
-   if (ewin->props.fixedpos)
+   if (EwinInhGetUser(ewin, move))
       val |= WIN_STATE_FIXED_POSITION;
    ecore_x_window_prop_card32_set(_EwinGetClientXwin(ewin), atom_set, &val, 1);
 }
@@ -796,9 +796,9 @@
        if (event->data.l[0] & WIN_STATE_FIXED_POSITION)
          {
             if (event->data.l[1] & WIN_STATE_FIXED_POSITION)
-               ewin->props.fixedpos = 1;
+               EwinInhSetUser(ewin, move, 1);
             else
-               ewin->props.fixedpos = 0;
+               EwinInhSetUser(ewin, move, 0);
          }
        if (event->data.l[0] & WIN_STATE_ARRANGE_IGNORE)
          {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -3 -r1.188 -r1.189
--- iconify.c   30 Oct 2005 19:40:49 -0000      1.188
+++ iconify.c   12 Nov 2005 17:51:11 -0000      1.189
@@ -553,8 +553,8 @@
    ewin->props.skip_ext_pager = 1;
    ewin->props.skip_focuslist = 1;
    ewin->props.skip_winlist = 1;
-   ewin->props.never_focus = 1;
-   ewin->props.never_iconify = 1;
+   EwinInhSetWM(ewin, focus, 1);
+   EwinInhSetWM(ewin, iconify, 1);
    ewin->props.autosave = 1;
 
    EoSetSticky(ewin, 1);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v
retrieving revision 1.243
retrieving revision 1.244
diff -u -3 -r1.243 -r1.244
--- ipc.c       30 Oct 2005 19:40:49 -0000      1.243
+++ ipc.c       12 Nov 2005 17:51:11 -0000      1.244
@@ -438,90 +438,18 @@
        IpcPrintf("Error: unknown operation");
        return;
 
-     case EWIN_OP_CLOSE:
-       EwinOpClose(ewin);
-       break;
-
-     case EWIN_OP_KILL:
-       EwinOpKill(ewin);
-       break;
-
-     case EWIN_OP_ICONIFY:
-       on = ewin->state.iconified;
-       if (SetEwinBoolean("window iconified", &on, param1, 0))
-          EwinOpIconify(ewin, !on);
-       break;
-
-     case EWIN_OP_OPACITY:
-       if (!strcmp(param1, "?"))
+     case EWIN_OP_BORDER:
+       if (!param1[0])
          {
-            IpcPrintf("opacity: %u", ewin->ewmh.opacity >> 24);
+            IpcPrintf("Error: no border specified");
             goto done;
          }
-       val = 0xff;
-       sscanf(param1, "%i", &val);
-       EwinOpSetOpacity(ewin, val);
-       break;
-
-#if USE_COMPOSITE
-     case EWIN_OP_SHADOW:
-       on = EoGetShadow(ewin);
-       if (SetEwinBoolean(wop->name, &on, param1, 0))
-          EoSetShadow(ewin, !on);
-       break;
-
-     case EWIN_OP_NO_REDIRECT:
-       on = EoGetNoRedirect(ewin);
-       on = ewin->o.noredir;
-       if (SetEwinBoolean(wop->name, &on, param1, 0))
-          EoSetNoRedirect(ewin, !on);
-       break;
-#endif
-
-     case EWIN_OP_SHADE:
-       if (SetEwinBoolean(wop->name, &ewin->state.shaded, param1, 0))
-          EwinOpShade(ewin, !ewin->state.shaded);
-       break;
-
-     case EWIN_OP_STICK:
-       on = EoIsSticky(ewin);
-       if (SetEwinBoolean(wop->name, &on, param1, 0))
-          EwinOpStick(ewin, !on);
-       break;
-
-     case EWIN_OP_FIXED_POS:
-       SetEwinBoolean(wop->name, &ewin->props.fixedpos, param1, 1);
-       EwinStateUpdate(ewin);
-       HintsSetWindowState(ewin);
-       break;
-
-     case EWIN_OP_FIXED_SIZE:
-       SetEwinBoolean(wop->name, &ewin->props.fixedsize, param1, 1);
-       EwinStateUpdate(ewin);
-       HintsSetWindowState(ewin);
-       break;
-
-     case EWIN_OP_NEVER_USE_AREA:
-       SetEwinBoolean(wop->name, &ewin->props.never_use_area, param1, 1);
-       break;
-
-     case EWIN_OP_FOCUS_CLICK:
-       SetEwinBoolean(wop->name, &ewin->props.focusclick, param1, 1);
-       break;
-
-     case EWIN_OP_FOCUS_NEVER:
-       SetEwinBoolean(wop->name, &ewin->props.never_focus, param1, 1);
-       EwinStateUpdate(ewin);
-       break;
-
-     case EWIN_OP_NO_BUTTON_GRABS:
-       if (SetEwinBoolean(wop->name, &ewin->props.no_button_grabs, param1, 1))
+       if (!strcmp(param1, "?"))
          {
-            if (ewin->props.no_button_grabs)
-               UnGrabButtonGrabs(ewin);
-            else
-               GrabButtonGrabs(ewin);
+            IpcPrintf("window border: %s", BorderGetName(ewin->border));
+            goto done;
          }
+       EwinOpSetBorder(ewin, param1);
        break;
 
      case EWIN_OP_TITLE:
@@ -542,48 +470,39 @@
        EwinBorderUpdateInfo(ewin);
        break;
 
-     case EWIN_OP_MAX_WIDTH:
-       MaxWidth(ewin, param1);
-       break;
-
-     case EWIN_OP_MAX_HEIGHT:
-       MaxHeight(ewin, param1);
+     case EWIN_OP_CLOSE:
+       EwinOpClose(ewin);
        break;
 
-     case EWIN_OP_MAX_SIZE:
-       MaxSize(ewin, param1);
+     case EWIN_OP_KILL:
+       EwinOpKill(ewin);
        break;
 
-     case EWIN_OP_RAISE:
-       EwinOpRaise(ewin);
+     case EWIN_OP_ICONIFY:
+       on = ewin->state.iconified;
+       if (SetEwinBoolean("window iconified", &on, param1, 1))
+          EwinOpIconify(ewin, on);
        break;
 
-     case EWIN_OP_LOWER:
-       EwinOpLower(ewin);
+     case EWIN_OP_SHADE:
+       on = ewin->state.shaded;
+       if (SetEwinBoolean(wop->name, &on, param1, 1))
+          EwinOpShade(ewin, on);
        break;
 
-     case EWIN_OP_LAYER:
-       if (!strcmp(param1, "?"))
-         {
-            IpcPrintf("window layer: %d", EoGetLayer(ewin));
-            goto done;
-         }
-       val = atoi(param1);
-       EwinOpSetLayer(ewin, val);
+     case EWIN_OP_STICK:
+       on = EoIsSticky(ewin);
+       if (SetEwinBoolean(wop->name, &on, param1, 1))
+          EwinOpStick(ewin, on);
        break;
 
-     case EWIN_OP_BORDER:
-       if (!param1[0])
-         {
-            IpcPrintf("Error: no border specified");
-            goto done;
-         }
+     case EWIN_OP_FOCUS:
        if (!strcmp(param1, "?"))
          {
-            IpcPrintf("window border: %s", BorderGetName(ewin->border));
+            IpcPrintf("focused: %s", (ewin == GetFocusEwin())? "yes" : "no");
             goto done;
          }
-       EwinOpSetBorder(ewin, param1);
+       EwinOpActivate(ewin);
        break;
 
      case EWIN_OP_DESK:
@@ -705,24 +624,22 @@
        EwinResize(ewin, a, b);
        break;
 
-     case EWIN_OP_FOCUS:
-       if (!strcmp(param1, "?"))
-         {
-            IpcPrintf("focused: %s", (ewin == GetFocusEwin())? "yes" : "no");
-            goto done;
-         }
-       EwinOpActivate(ewin);
+     case EWIN_OP_MAX_WIDTH:
+       MaxWidth(ewin, param1);
        break;
 
-     case EWIN_OP_FULLSCREEN:
-       on = ewin->state.fullscreen;
-       if (SetEwinBoolean(wop->name, &on, param1, 0))
-          EwinSetFullscreen(ewin, !on);
+     case EWIN_OP_MAX_HEIGHT:
+       MaxHeight(ewin, param1);
        break;
 
-     case EWIN_OP_SKIP_LISTS:
-       if (SetEwinBoolean(wop->name, &ewin->props.skip_ext_task, param1, 1))
-          EwinOpSkipLists(ewin, ewin->props.skip_ext_task);
+     case EWIN_OP_MAX_SIZE:
+       MaxSize(ewin, param1);
+       break;
+
+     case EWIN_OP_FULLSCREEN:
+       on = ewin->state.fullscreen;
+       if (SetEwinBoolean(wop->name, &on, param1, 1))
+          EwinSetFullscreen(ewin, on);
        break;
 
      case EWIN_OP_ZOOM:
@@ -732,9 +649,126 @@
           Zoom(ewin);
        break;
 
+     case EWIN_OP_LAYER:
+       if (!strcmp(param1, "?"))
+         {
+            IpcPrintf("window layer: %d", EoGetLayer(ewin));
+            goto done;
+         }
+       val = atoi(param1);
+       EwinOpSetLayer(ewin, val);
+       break;
+
+     case EWIN_OP_RAISE:
+       EwinOpRaise(ewin);
+       break;
+
+     case EWIN_OP_LOWER:
+       EwinOpLower(ewin);
+       break;
+
+     case EWIN_OP_OPACITY:
+       if (!strcmp(param1, "?"))
+         {
+            IpcPrintf("opacity: %u", ewin->ewmh.opacity >> 24);
+            goto done;
+         }
+       val = 0xff;
+       sscanf(param1, "%i", &val);
+       EwinOpSetOpacity(ewin, val);
+       break;
+
      case EWIN_OP_SNAP:
        SnapshotEwinParse(ewin, atword(params, 3));
        break;
+
+     case EWIN_OP_SKIP_LISTS:
+       on = ewin->props.skip_ext_task;
+       if (SetEwinBoolean(wop->name, &on, param1, 1))
+          EwinOpSkipLists(ewin, on);
+       break;
+
+     case EWIN_OP_NEVER_USE_AREA:
+       on = ewin->props.never_use_area;
+       SetEwinBoolean(wop->name, &on, param1, 1);
+       ewin->props.never_use_area = on;
+       break;
+
+     case EWIN_OP_FOCUS_CLICK:
+       on = ewin->props.focusclick;
+       SetEwinBoolean(wop->name, &on, param1, 1);
+       ewin->props.focusclick = on;
+       break;
+
+     case EWIN_OP_NO_BUTTON_GRABS:
+       on = ewin->props.no_button_grabs;
+       if (SetEwinBoolean(wop->name, &on, param1, 1))
+         {
+            ewin->props.no_button_grabs = on;
+            if (ewin->props.no_button_grabs)
+               UnGrabButtonGrabs(ewin);
+            else
+               GrabButtonGrabs(ewin);
+         }
+       break;
+
+     case EWIN_OP_INH_APP_MOVE:
+       on = EwinInhGetApp(ewin, move);
+       SetEwinBoolean(wop->name, &on, param1, 1);
+       EwinInhSetApp(ewin, move, on);
+       break;
+
+     case EWIN_OP_INH_APP_SIZE:
+       on = EwinInhGetApp(ewin, size);
+       SetEwinBoolean(wop->name, &on, param1, 1);
+       EwinInhSetApp(ewin, size, on);
+       break;
+
+     case EWIN_OP_INH_USER_CLOSE:
+       on = EwinInhGetUser(ewin, close);
+       SetEwinBoolean(wop->name, &on, param1, 1);
+       EwinInhSetUser(ewin, close, on);
+       EwinStateUpdate(ewin);
+       HintsSetWindowState(ewin);
+       break;
+
+     case EWIN_OP_INH_USER_MOVE:
+       on = EwinInhGetUser(ewin, move);
+       SetEwinBoolean(wop->name, &on, param1, 1);
+       EwinInhSetUser(ewin, move, on);
+       EwinStateUpdate(ewin);
+       HintsSetWindowState(ewin);
+       break;
+
+     case EWIN_OP_INH_USER_SIZE:
+       on = EwinInhGetUser(ewin, size);
+       SetEwinBoolean(wop->name, &on, param1, 1);
+       EwinInhSetUser(ewin, size, on);
+       EwinStateUpdate(ewin);
+       HintsSetWindowState(ewin);
+       break;
+
+     case EWIN_OP_INH_WM_FOCUS:
+       on = EwinInhGetWM(ewin, focus);
+       SetEwinBoolean(wop->name, &on, param1, 1);
+       EwinInhSetWM(ewin, focus, on);
+       EwinStateUpdate(ewin);
+       break;
+
+#if USE_COMPOSITE
+     case EWIN_OP_SHADOW:
+       on = EoGetShadow(ewin);
+       if (SetEwinBoolean(wop->name, &on, param1, 1))
+          EoSetShadow(ewin, on);
+       break;
+
+     case EWIN_OP_NO_REDIRECT:
+       on = EoGetNoRedirect(ewin);
+       on = ewin->o.noredir;
+       if (SetEwinBoolean(wop->name, &on, param1, 1))
+          EoSetNoRedirect(ewin, on);
+       break;
+#endif
      }
 
  done:
@@ -1092,9 +1126,9 @@
             ewin->mwm.decor_title, ewin->mwm.decor_menu,
             ewin->mwm.decor_minimize, ewin->mwm.decor_maximize,
             ewin->icccm.need_input, ewin->icccm.take_focus,
-            ewin->props.never_focus, ewin->props.focusclick,
-            ewin->props.never_use_area, ewin->props.fixedpos,
-            ewin->props.fixedsize, EoGetDeskNum(ewin),
+            EwinInhGetWM(ewin, focus), ewin->props.focusclick,
+            ewin->props.never_use_area, EwinInhGetUser(ewin, move),
+            EwinInhGetUser(ewin, size), EoGetDeskNum(ewin),
             EoGetLayer(ewin), ewin->o.ilayer,
             ewin->state.iconified, EoIsSticky(ewin), ewin->state.shaded,
             ewin->state.docked, ewin->state.state, EoIsShown(ewin),
@@ -1357,26 +1391,28 @@
     "You can use ? after most of these commands to receive the current\n"
     "status of that flag\n"
     "available win_op commands are:\n"
+    "  win_op <windowid> border <BORDERNAME>\n"
+    "  win_op <windowid> title <title>\n"
     "  win_op <windowid> <close/kill>\n"
-    "  win_op <windowid> <fixedpos/fixedsize/never_use_area>\n"
-    "  win_op <windowid> <focus/focusclick/neverfocus>\n"
-    "  win_op <windowid> <fullscreen/iconify/shade/stick>\n"
-    "  win_op <windowid> no_button_grabs\n"
+    "  win_op <windowid> <focus/iconify/shade/stick>\n"
+    "  win_op <windowid> desk <desktochangeto/next/prev>\n"
+    "  win_op <windowid> area <x> <y>\n"
+    "  win_op <windowid> <move/size> <x> <y>\n"
+    "          (you can use ? and ?? to retreive client and frame locations)\n"
+    "  win_op <windowid> <mr/sr> <x> <y>   (incremental move/size)\n"
+    "  win_op <windowid> toggle_<width/height/size> 
<conservative/available/xinerama>\n"
+    "  win_op <windowid> <fullscreen/zoom>\n"
+    "  win_op <windowid> layer <0-100,4=normal>\n"
     "  win_op <windowid> <raise/lower>\n"
-    "  win_op <windowid> skiplists\n"
+    "  win_op <windowid> opacity <1-255,255=opaque>\n"
     "  win_op <windowid> snap <what>\n"
     "         <what>: all, none, border, command, desktop, dialog, group, 
icon,\n"
     "                 layer, location, opacity, shade, shadow, size, sticky\n"
+    "  win_op <windowid> 
<focusclick/never_use_area/no_button_grabs/skiplists>\n"
+    "  win_op <windowid> <no_app_move/size>\n"
+    "  win_op <windowid> <no_user_close/move/size>\n"
+    "  win_op <windowid> <no_wm_focus>\n"
     "  win_op <windowid> noshadow\n"
-    "  win_op <windowid> toggle_<width/height/size> 
<conservative/available/xinerama>\n"
-    "          (or none for absolute)\n"
-    "  win_op <windowid> border <BORDERNAME>\n"
-    "  win_op <windowid> desk <desktochangeto/next/prev>\n"
-    "  win_op <windowid> area <x> <y>\n"
-    "  win_op <windowid> <move/resize> <x> <y>\n"
-    "          (you can use ? and ?? to retreive client and frame locations)\n"
-    "  win_op <windowid> title <title>\n"
-    "  win_op <windowid> layer <0-100,4=normal>\n"
     "<windowid> may be substituted with \"current\" to use the current 
window\n"},
    {
     IPC_WinList,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -3 -r1.222 -r1.223
--- menus.c     30 Oct 2005 19:40:49 -0000      1.222
+++ menus.c     12 Nov 2005 17:51:11 -0000      1.223
@@ -223,7 +223,7 @@
    ewin->props.no_actions = 1;
    ewin->props.skip_focuslist = 1;
    ewin->props.skip_winlist = 1;
-   ewin->props.never_focus = 1;
+   EwinInhSetWM(ewin, focus, 1);
    ewin->client.grav = StaticGravity;
 
    ICCCM_SetSizeConstraints(ewin, m->w, m->h, m->w, m->h, 0, 0, 1, 1,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/mod-misc.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- mod-misc.c  10 Nov 2005 21:39:29 -0000      1.26
+++ mod-misc.c  12 Nov 2005 17:51:11 -0000      1.27
@@ -223,7 +223,7 @@
     MiscIpcConfig,
     "misc", NULL,
     "Miscellaneous functions",
-    "  misc cfg <thing>         Configure thing 
(focus/fx/moveresize/placement/remember)\n"}
+    "  misc cfg <thing>         Configure thing 
(autoraise/misc/moveresize/placement/remember/session)\n"}
 };
 #define N_IPC_FUNCS (sizeof(MiscIpcArray)/sizeof(IpcItem))
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -3 -r1.184 -r1.185
--- pager.c     30 Oct 2005 19:40:49 -0000      1.184
+++ pager.c     12 Nov 2005 17:51:11 -0000      1.185
@@ -610,7 +610,7 @@
    ewin->props.skip_ext_pager = 1;
    ewin->props.skip_focuslist = 1;
    ewin->props.skip_winlist = 1;
-   ewin->props.never_focus = 1;
+   EwinInhSetWM(ewin, focus, 1);
    ewin->props.autosave = 1;
 
    EoSetSticky(ewin, 1);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/snaps.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -3 -r1.109 -r1.110
--- snaps.c     5 Nov 2005 17:12:53 -0000       1.109
+++ snaps.c     12 Nov 2005 17:51:11 -0000      1.110
@@ -364,7 +364,7 @@
 static void
 SnapEwinNeverFocus(Snapshot * sn, const EWin * ewin)
 {
-   sn->neverfocus = ewin->props.never_focus;
+   sn->neverfocus = EwinInhGetWM(ewin, focus); /* FIXME */
 }
 
 static void
@@ -1481,7 +1481,7 @@
      }
 
    if (use_flags & SNAP_USE_FOCUS_NEVER)
-      ewin->props.never_focus = sn->neverfocus;
+      EwinInhSetWM(ewin, focus, sn->neverfocus);
 
    if (use_flags & SNAP_USE_SHADED)
       ewin->state.shaded = sn->shaded;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/windowmatch.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- windowmatch.c       30 Oct 2005 19:40:49 -0000      1.40
+++ windowmatch.c       12 Nov 2005 17:51:11 -0000      1.41
@@ -658,7 +658,7 @@
    return 1;
 }
 
-#define WINOP_GET_BOOL(item, val) item = GetBoolean(val)
+#define WINOP_SET_BOOL(item, val) item = GetBoolean(val)
 
 static void
 WindowMatchEwinOpsAction(EWin * ewin, int op, const char *args)
@@ -673,104 +673,116 @@
        /* We should not get here */
        return;
 
+     case EWIN_OP_TITLE:
+       _EFREE(ewin->icccm.wm_name);
+       ewin->icccm.wm_name = Estrdup(args);
+       break;
+
      case EWIN_OP_ICONIFY:
-       WINOP_GET_BOOL(ewin->icccm.start_iconified, args);
+       WINOP_SET_BOOL(ewin->icccm.start_iconified, args);
        break;
 
      case EWIN_OP_SHADE:
-       WINOP_GET_BOOL(ewin->state.shaded, args);
+       WINOP_SET_BOOL(ewin->state.shaded, args);
        break;
 
      case EWIN_OP_STICK:
-       WINOP_GET_BOOL(ewin->o.sticky, args);
+       WINOP_SET_BOOL(ewin->o.sticky, args);
        break;
 
-     case EWIN_OP_FIXED_POS:
-       WINOP_GET_BOOL(ewin->props.fixedpos, args);
+     case EWIN_OP_DESK:
+       EoSetDesk(ewin, DeskGet(atoi(args)));
        break;
 
-     case EWIN_OP_FIXED_SIZE:
-       WINOP_GET_BOOL(ewin->props.fixedsize, args);
+     case EWIN_OP_AREA:
+       a = b = 0;
+       if (sscanf(args, "%u %u", &a, &b) < 2)
+          break;
+       EwinMoveToArea(ewin, a, b);     /* FIXME - We should not move here */
        break;
 
-     case EWIN_OP_NEVER_USE_AREA:
-       WINOP_GET_BOOL(ewin->props.never_use_area, args);
+     case EWIN_OP_MOVE:
+       a = ewin->client.x;
+       b = ewin->client.y;
+       if (sscanf(args, "%i %i", &a, &b) < 2)
+          break;
+       ewin->client.x = a;
+       ewin->client.y = b;
+       ewin->state.placed = 1;
        break;
 
-     case EWIN_OP_FOCUS_CLICK:
-       WINOP_GET_BOOL(ewin->props.focusclick, args);
+     case EWIN_OP_SIZE:
+       a = ewin->client.w;
+       b = ewin->client.h;
+       if (sscanf(args, "%u %u", &a, &b) < 2)
+          break;
+       ewin->client.w = a;
+       ewin->client.h = b;
        break;
 
-     case EWIN_OP_FOCUS_NEVER:
-       WINOP_GET_BOOL(ewin->props.never_focus, args);
+     case EWIN_OP_FULLSCREEN:
+       WINOP_SET_BOOL(ewin->state.fullscreen, args);
        break;
 
-     case EWIN_OP_NO_BUTTON_GRABS:
-       WINOP_GET_BOOL(ewin->props.no_button_grabs, args);
+     case EWIN_OP_LAYER:
+       EoSetLayer(ewin, atoi(args));
        break;
 
-     case EWIN_OP_FULLSCREEN:
-       WINOP_GET_BOOL(ewin->state.fullscreen, args);
+     case EWIN_OP_OPACITY:
+       ewin->ewmh.opacity = OpacityExt(atoi(args));
        break;
 
      case EWIN_OP_SKIP_LISTS:
-       WINOP_GET_BOOL(ewin->props.skip_winlist, args);
+       WINOP_SET_BOOL(ewin->props.skip_winlist, args);
        ewin->props.skip_focuslist = ewin->props.skip_ext_task =
           ewin->props.skip_winlist;
        break;
 
-     case EWIN_OP_OPACITY:
-       ewin->ewmh.opacity = OpacityExt(atoi(args));
+     case EWIN_OP_FOCUS_CLICK:
+       WINOP_SET_BOOL(ewin->props.focusclick, args);
        break;
 
-#if USE_COMPOSITE
-     case EWIN_OP_SHADOW:
-       WINOP_GET_BOOL(ewin->o.shadow, args);
+     case EWIN_OP_NEVER_USE_AREA:
+       WINOP_SET_BOOL(ewin->props.never_use_area, args);
        break;
 
-     case EWIN_OP_NO_REDIRECT:
-       WINOP_GET_BOOL(ewin->o.noredir, args);
+     case EWIN_OP_NO_BUTTON_GRABS:
+       WINOP_SET_BOOL(ewin->props.no_button_grabs, args);
        break;
-#endif
 
-     case EWIN_OP_TITLE:
-       _EFREE(ewin->icccm.wm_name);
-       ewin->icccm.wm_name = Estrdup(args);
+     case EWIN_OP_INH_APP_MOVE:
+       WINOP_SET_BOOL(EwinInhGetApp(ewin, move), args);
        break;
 
-     case EWIN_OP_LAYER:
-       EoSetLayer(ewin, atoi(args));
+     case EWIN_OP_INH_APP_SIZE:
+       WINOP_SET_BOOL(EwinInhGetApp(ewin, size), args);
        break;
 
-     case EWIN_OP_DESK:
-       EoSetDesk(ewin, DeskGet(atoi(args)));
+     case EWIN_OP_INH_USER_CLOSE:
+       WINOP_SET_BOOL(EwinInhGetUser(ewin, close), args);
        break;
 
-     case EWIN_OP_AREA:
-       a = b = 0;
-       if (sscanf(args, "%u %u", &a, &b) < 2)
-          break;
-       EwinMoveToArea(ewin, a, b);     /* FIXME - We should not move here */
+     case EWIN_OP_INH_USER_MOVE:
+       WINOP_SET_BOOL(EwinInhGetUser(ewin, move), args);
        break;
 
-     case EWIN_OP_MOVE:
-       a = ewin->client.x;
-       b = ewin->client.y;
-       if (sscanf(args, "%i %i", &a, &b) < 2)
-          break;
-       ewin->client.x = a;
-       ewin->client.y = b;
-       ewin->state.placed = 1;
+     case EWIN_OP_INH_USER_SIZE:
+       WINOP_SET_BOOL(EwinInhGetUser(ewin, size), args);
        break;
 
-     case EWIN_OP_SIZE:
-       a = ewin->client.w;
-       b = ewin->client.h;
-       if (sscanf(args, "%u %u", &a, &b) < 2)
-          break;
-       ewin->client.w = a;
-       ewin->client.h = b;
+     case EWIN_OP_INH_WM_FOCUS:
+       WINOP_SET_BOOL(EwinInhGetWM(ewin, focus), args);
+       break;
+
+#if USE_COMPOSITE
+     case EWIN_OP_SHADOW:
+       WINOP_SET_BOOL(ewin->o.shadow, args);
        break;
+
+     case EWIN_OP_NO_REDIRECT:
+       WINOP_SET_BOOL(ewin->o.noredir, args);
+       break;
+#endif
      }
 }
 




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to