]> Dogcows Code - chaz/openbox/commitdiff
Some cleanups in the mapping procedure. Apply requested states during the process.
authorDana Jansens <danakj@orodu.net>
Fri, 17 Jan 2003 09:15:07 +0000 (09:15 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 17 Jan 2003 09:15:07 +0000 (09:15 +0000)
Add new function types for new netwm supported actions, i.e. Func_Shade and Func_Fullscreen.
Add support for the _NET_WM_FULLSCREEN state.

src/client.cc
src/client.hh
src/openbox.py
src/openbox_wrap.cc
src/screen.cc

index e8a6b84bd14028f96b0e7e08147a09c454a7b9e3..b36ba9aff2a6fe9bdf701b5f1de4f848b7396f56 100644 (file)
@@ -168,15 +168,17 @@ void Client::getType()
 
 void Client::setupDecorAndFunctions()
 {
-  // start with everything
+  // start with everything (cept fullscreen)
   _decorations = Decor_Titlebar | Decor_Handle | Decor_Border |
     Decor_Iconify | Decor_Maximize;
-  _functions = Func_Resize | Func_Move | Func_Iconify | Func_Maximize;
+  _functions = Func_Resize | Func_Move | Func_Iconify | Func_Maximize |
+    Func_Shade;
   
   switch (_type) {
   case Type_Normal:
     // normal windows retain all of the possible decorations and
-    // functionality
+    // functionality, and are the only windows that you can fullscreen
+    _functions |= Func_Fullscreen;
 
   case Type_Dialog:
     // dialogs cannot be maximized
@@ -209,8 +211,11 @@ void Client::setupDecorAndFunctions()
         _decorations &= ~Decor_Border;
       if (! (_mwmhints.decorations & MwmDecor_Handle))
         _decorations &= ~Decor_Handle;
-      if (! (_mwmhints.decorations & MwmDecor_Title))
+      if (! (_mwmhints.decorations & MwmDecor_Title)) {
         _decorations &= ~Decor_Titlebar;
+        // if we don't have a titlebar, then we cannot shade!
+        _functions &= ~Func_Shade;
+      }
       if (! (_mwmhints.decorations & MwmDecor_Iconify))
         _decorations &= ~Decor_Iconify;
       if (! (_mwmhints.decorations & MwmDecor_Maximize))
@@ -287,10 +292,9 @@ void Client::getState()
     for (unsigned long i = 0; i < num; ++i) {
       if (state[i] == otk::Property::atoms.net_wm_state_modal)
         _modal = true;
-      else if (state[i] == otk::Property::atoms.net_wm_state_shaded) {
+      else if (state[i] == otk::Property::atoms.net_wm_state_shaded)
         _shaded = true;
-        _wmstate = IconicState;
-      } else if (state[i] == otk::Property::atoms.net_wm_state_skip_taskbar)
+      else if (state[i] == otk::Property::atoms.net_wm_state_skip_taskbar)
         _skip_taskbar = true;
       else if (state[i] == otk::Property::atoms.net_wm_state_skip_pager)
         _skip_pager = true;
@@ -657,6 +661,7 @@ void Client::setDesktop(long target)
 void Client::setState(StateAction action, long data1, long data2)
 {
   bool shadestate = _shaded;
+  bool fsstate = _fullscreen;
 
   if (!(action == State_Add || action == State_Remove ||
         action == State_Toggle))
@@ -703,16 +708,13 @@ void Client::setState(StateAction action, long data1, long data2)
         _max_horz = true;
         // XXX: resize the window etc
       } else if (state == otk::Property::atoms.net_wm_state_shaded) {
-        if (_shaded) continue;
-        // shade when we're all thru here
         shadestate = true;
       } else if (state == otk::Property::atoms.net_wm_state_skip_taskbar) {
         _skip_taskbar = true;
       } else if (state == otk::Property::atoms.net_wm_state_skip_pager) {
         _skip_pager = true;
       } else if (state == otk::Property::atoms.net_wm_state_fullscreen) {
-        if (_fullscreen) continue;
-        _fullscreen = true;
+        fsstate = true;
       } else if (state == otk::Property::atoms.net_wm_state_above) {
         if (_above) continue;
         _above = true;
@@ -734,16 +736,13 @@ void Client::setState(StateAction action, long data1, long data2)
         _max_horz = false;
         // XXX: resize the window etc
       } else if (state == otk::Property::atoms.net_wm_state_shaded) {
-        if (!_shaded) continue;
-        // unshade when we're all thru here
         shadestate = false;
       } else if (state == otk::Property::atoms.net_wm_state_skip_taskbar) {
         _skip_taskbar = false;
       } else if (state == otk::Property::atoms.net_wm_state_skip_pager) {
         _skip_pager = false;
       } else if (state == otk::Property::atoms.net_wm_state_fullscreen) {
-        if (!_fullscreen) continue;
-        _fullscreen = false;
+        fsstate = false;
       } else if (state == otk::Property::atoms.net_wm_state_above) {
         if (!_above) continue;
         _above = false;
@@ -753,6 +752,10 @@ void Client::setState(StateAction action, long data1, long data2)
       }
     }
   }
+  // change fullscreen state before shading, as it will affect if the window
+  // can shade or not
+  if (fsstate != _fullscreen)
+    fullscreen(fsstate);
   if (shadestate != _shaded)
     shade(shadestate);
   calcLayer();
@@ -1074,18 +1077,23 @@ void Client::changeState()
 
 void Client::changeAllowedActions(void)
 {
-  Atom actions[7];
+  Atom actions[9];
   int num = 0;
 
-  actions[num++] = otk::Property::atoms.net_wm_action_shade;
   actions[num++] = otk::Property::atoms.net_wm_action_change_desktop;
 
+  if (_functions & Func_Shade)
+    actions[num++] = otk::Property::atoms.net_wm_action_shade;
   if (_functions & Func_Close)
     actions[num++] = otk::Property::atoms.net_wm_action_close;
   if (_functions & Func_Move)
-        actions[num++] = otk::Property::atoms.net_wm_action_move;
+    actions[num++] = otk::Property::atoms.net_wm_action_move;
+  if (_functions & Func_Iconify)
+    actions[num++] = otk::Property::atoms.net_wm_action_minimize;
   if (_functions & Func_Resize)
-        actions[num++] = otk::Property::atoms.net_wm_action_resize;
+    actions[num++] = otk::Property::atoms.net_wm_action_resize;
+  if (_functions & Func_Fullscreen)
+    actions[num++] = otk::Property::atoms.net_wm_action_fullscreen;
   if (_functions & Func_Maximize) {
     actions[num++] = otk::Property::atoms.net_wm_action_maximize_horz;
     actions[num++] = otk::Property::atoms.net_wm_action_maximize_vert;
@@ -1096,9 +1104,34 @@ void Client::changeAllowedActions(void)
 }
 
 
+void Client::applyStartupState()
+{
+  // these are in a carefully crafted order..
+  
+  if (_fullscreen) {
+    _fullscreen = false;
+    fullscreen(true);
+  }
+  if (_shaded) {
+    _shaded = false;
+    shade(true);
+  }
+  
+  if (_max_vert); // XXX: incomplete
+  if (_max_horz); // XXX: incomplete
+
+  if (_skip_taskbar); // nothing to do for this
+  if (_skip_pager);   // nothing to do for this
+  if (_modal);        // nothing to do for this
+  if (_above);        // nothing to do for this
+  if (_below);        // nothing to do for this
+}
+
+
 void Client::shade(bool shade)
 {
-  if (shade == _shaded) return; // already done
+  if (!(_functions & Func_Shade) || // can't
+      _shaded == shade) return;     // already done
 
   _wmstate = shade ? IconicState : NormalState;
   _shaded = shade;
@@ -1107,6 +1140,54 @@ void Client::shade(bool shade)
 }
 
 
+void Client::fullscreen(bool fs)
+{
+  static FunctionFlags saved_func;
+  static DecorationFlags saved_decor;
+  static otk::Rect saved_area;
+  static otk::Point saved_logical_size;
+
+  if (!(_functions & Func_Fullscreen) || // can't
+      _fullscreen == fs) return;         // already done
+
+  _fullscreen = fs;
+  changeState(); // change the state hints on the client
+
+  if (fs) {
+    // save the functions and remove them
+    saved_func = _functions;
+    _functions = _functions & (Func_Close | Func_Fullscreen | Func_Iconify);
+    // save the decorations and remove them
+    saved_decor = _decorations;
+    _decorations = 0;
+    // save the area and adjust it (we don't call internal resize here for
+    // constraints on the size, etc, we just make it fullscreen).
+    saved_area = _area;
+    const otk::ScreenInfo *info = otk::display->screenInfo(_screen);
+    _area.setRect(0, 0, info->width(), info->height());
+    saved_logical_size = _logical_size;
+    _logical_size.setPoint((info->width() - _base_size.x()) / _size_inc.x(),
+                           (info->height() - _base_size.y()) / _size_inc.y());
+  } else {
+    _functions = saved_func;
+    _decorations = saved_decor;
+    _area = saved_area;
+    _logical_size = saved_logical_size;
+  }
+  
+  changeAllowedActions();  // based on the new _functions
+  
+  frame->adjustSize();     // drop/replace the decor's and resize
+  frame->adjustPosition(); // get (back) in position!
+
+  // raise (back) into our stacking layer
+  openbox->screen(_screen)->raiseWindow(this);
+
+  // try focus us when we go into fullscreen mode
+  if (fs) focus();
+}
+
+
 bool Client::focus() const
 {
   // won't try focus if the client doesn't want it, or if the window isn't
index d2c8b5f81c828c2012d1903e507040f84b3972da..5788a3e60322c4a86f5c250ef488bf4470b95ad7 100644 (file)
@@ -121,11 +121,13 @@ public:
   };
 
   //! The things the user can do to the client window
-  enum Function { Func_Resize   = 1 << 0, //!< Allow resizing
-                  Func_Move     = 1 << 1, //!< Allow moving
-                  Func_Iconify  = 1 << 2, //!< Allow to be iconified
-                  Func_Maximize = 1 << 3, //!< Allow to be maximized
-                  Func_Close    = 1 << 4  //!< Allow to be closed
+  enum Function { Func_Resize     = 1 << 0, //!< Allow resizing
+                  Func_Move       = 1 << 1, //!< Allow moving
+                  Func_Iconify    = 1 << 2, //!< Allow to be iconified
+                  Func_Maximize   = 1 << 3, //!< Allow to be maximized
+                  Func_Shade      = 1 << 4, //!< Allow to be shaded
+                  Func_Fullscreen = 1 << 5, //!< Allow to be made fullscreen
+                  Func_Close      = 1 << 6  //!< Allow to be closed
   };
   //! Holds a bitmask of Client::Function values
   typedef unsigned char FunctionFlags;
@@ -339,6 +341,12 @@ private:
   //! Sets the wm_state to the specified value
   void setWMState(long state);
   //! Adjusts the window's net_state
+  /*!
+    This should not be called as part of the window mapping process! It is for
+    use when updating the state post-mapping.<br>
+    Client::applyStartupState is used to do the same things during the mapping
+    process.
+  */
   void setState(StateAction action, long data1, long data2);
 
   //! Sends the window to the specified desktop
@@ -380,6 +388,13 @@ private:
   */
   void shade(bool shade);
 
+  //! Fullscreen's or unfullscreen's the client window
+  /*!
+    @param fs true if the window should be made fullscreen; false if it should
+              be returned to normal state.
+  */
+  void fullscreen(bool fs);
+
   //! Internal version of the Client::move function
   /*!
     @param x The X coordinate to move to.
@@ -494,6 +509,8 @@ BB    @param window The window id that the Client class should handle
     When the window is shaded, only its titlebar is visible.
   */
   inline bool shaded() const { return _shaded; }
+  //! Returns if the window is in fullscreen mode
+  inline bool fullscreen() const { return _fullscreen; }
   //! Returns if the window is iconified
   /*!
     When the window is iconified, it is not visible at all (except in iconbars/
@@ -507,6 +524,13 @@ BB    @param window The window id that the Client class should handle
   //! Returns the window's stacking layer
   inline StackLayer layer() const { return _layer; }
 
+  //! Applies the states requested when the window mapped
+  /*!
+    This should be called only once, during the window mapping process. It
+    applies things like maximized, and fullscreen.
+  */
+  void applyStartupState();
+  
   //! Removes or reapplies the client's border to its window
   /*!
     Used when managing and unmanaging a window.
index 3c98c2d4df96b26a1f785a0a2cabace3a1e0616a..5a6d18b2afb64f1c7fa7e28eec643c85ea0789e2 100644 (file)
@@ -271,15 +271,24 @@ class Atoms(_object):
     __swig_setmethods__["net_wm_action_resize"] = _openbox.Atoms_net_wm_action_resize_set
     __swig_getmethods__["net_wm_action_resize"] = _openbox.Atoms_net_wm_action_resize_get
     if _newclass:net_wm_action_resize = property(_openbox.Atoms_net_wm_action_resize_get,_openbox.Atoms_net_wm_action_resize_set)
+    __swig_setmethods__["net_wm_action_minimize"] = _openbox.Atoms_net_wm_action_minimize_set
+    __swig_getmethods__["net_wm_action_minimize"] = _openbox.Atoms_net_wm_action_minimize_get
+    if _newclass:net_wm_action_minimize = property(_openbox.Atoms_net_wm_action_minimize_get,_openbox.Atoms_net_wm_action_minimize_set)
     __swig_setmethods__["net_wm_action_shade"] = _openbox.Atoms_net_wm_action_shade_set
     __swig_getmethods__["net_wm_action_shade"] = _openbox.Atoms_net_wm_action_shade_get
     if _newclass:net_wm_action_shade = property(_openbox.Atoms_net_wm_action_shade_get,_openbox.Atoms_net_wm_action_shade_set)
+    __swig_setmethods__["net_wm_action_stick"] = _openbox.Atoms_net_wm_action_stick_set
+    __swig_getmethods__["net_wm_action_stick"] = _openbox.Atoms_net_wm_action_stick_get
+    if _newclass:net_wm_action_stick = property(_openbox.Atoms_net_wm_action_stick_get,_openbox.Atoms_net_wm_action_stick_set)
     __swig_setmethods__["net_wm_action_maximize_horz"] = _openbox.Atoms_net_wm_action_maximize_horz_set
     __swig_getmethods__["net_wm_action_maximize_horz"] = _openbox.Atoms_net_wm_action_maximize_horz_get
     if _newclass:net_wm_action_maximize_horz = property(_openbox.Atoms_net_wm_action_maximize_horz_get,_openbox.Atoms_net_wm_action_maximize_horz_set)
     __swig_setmethods__["net_wm_action_maximize_vert"] = _openbox.Atoms_net_wm_action_maximize_vert_set
     __swig_getmethods__["net_wm_action_maximize_vert"] = _openbox.Atoms_net_wm_action_maximize_vert_get
     if _newclass:net_wm_action_maximize_vert = property(_openbox.Atoms_net_wm_action_maximize_vert_get,_openbox.Atoms_net_wm_action_maximize_vert_set)
+    __swig_setmethods__["net_wm_action_fullscreen"] = _openbox.Atoms_net_wm_action_fullscreen_set
+    __swig_getmethods__["net_wm_action_fullscreen"] = _openbox.Atoms_net_wm_action_fullscreen_get
+    if _newclass:net_wm_action_fullscreen = property(_openbox.Atoms_net_wm_action_fullscreen_get,_openbox.Atoms_net_wm_action_fullscreen_set)
     __swig_setmethods__["net_wm_action_change_desktop"] = _openbox.Atoms_net_wm_action_change_desktop_set
     __swig_getmethods__["net_wm_action_change_desktop"] = _openbox.Atoms_net_wm_action_change_desktop_get
     if _newclass:net_wm_action_change_desktop = property(_openbox.Atoms_net_wm_action_change_desktop_get,_openbox.Atoms_net_wm_action_change_desktop_set)
@@ -756,6 +765,8 @@ class Client(EventHandler,):
     Func_Move = _openbox.Client_Func_Move
     Func_Iconify = _openbox.Client_Func_Iconify
     Func_Maximize = _openbox.Client_Func_Maximize
+    Func_Shade = _openbox.Client_Func_Shade
+    Func_Fullscreen = _openbox.Client_Func_Fullscreen
     Func_Close = _openbox.Client_Func_Close
     Decor_Titlebar = _openbox.Client_Decor_Titlebar
     Decor_Handle = _openbox.Client_Decor_Handle
@@ -793,10 +804,12 @@ class Client(EventHandler,):
     def transientFor(*args): return apply(_openbox.Client_transientFor,args)
     def modal(*args): return apply(_openbox.Client_modal,args)
     def shaded(*args): return apply(_openbox.Client_shaded,args)
+    def fullscreen(*args): return apply(_openbox.Client_fullscreen,args)
     def iconic(*args): return apply(_openbox.Client_iconic,args)
     def maxVert(*args): return apply(_openbox.Client_maxVert,args)
     def maxHorz(*args): return apply(_openbox.Client_maxHorz,args)
     def layer(*args): return apply(_openbox.Client_layer,args)
+    def applyStartupState(*args): return apply(_openbox.Client_applyStartupState,args)
     def toggleClientBorder(*args): return apply(_openbox.Client_toggleClientBorder,args)
     def area(*args): return apply(_openbox.Client_area,args)
     def strut(*args): return apply(_openbox.Client_strut,args)
index 81680d534e77132fc68d232aeac0af2112bf29c5..1fba163c3aa8519f7901baa4223588115e292ee3 100644 (file)
@@ -3621,6 +3621,43 @@ static PyObject *_wrap_Atoms_net_wm_action_resize_get(PyObject *self, PyObject *
 }
 
 
+static PyObject *_wrap_Atoms_net_wm_action_minimize_set(PyObject *self, PyObject *args) {
+    PyObject *resultobj;
+    otk::Atoms *arg1 = (otk::Atoms *) 0 ;
+    Atom arg2 ;
+    PyObject * obj0  = 0 ;
+    PyObject * obj1  = 0 ;
+    
+    if(!PyArg_ParseTuple(args,(char *)"OO:Atoms_net_wm_action_minimize_set",&obj0,&obj1)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Atoms,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    arg2 = (Atom) PyInt_AsLong(obj1);
+    if (PyErr_Occurred()) SWIG_fail;
+    if (arg1) (arg1)->net_wm_action_minimize = arg2;
+    
+    Py_INCREF(Py_None); resultobj = Py_None;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
+static PyObject *_wrap_Atoms_net_wm_action_minimize_get(PyObject *self, PyObject *args) {
+    PyObject *resultobj;
+    otk::Atoms *arg1 = (otk::Atoms *) 0 ;
+    Atom result;
+    PyObject * obj0  = 0 ;
+    
+    if(!PyArg_ParseTuple(args,(char *)"O:Atoms_net_wm_action_minimize_get",&obj0)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Atoms,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    result = (Atom) ((arg1)->net_wm_action_minimize);
+    
+    resultobj = PyInt_FromLong((long)result);
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_Atoms_net_wm_action_shade_set(PyObject *self, PyObject *args) {
     PyObject *resultobj;
     otk::Atoms *arg1 = (otk::Atoms *) 0 ;
@@ -3658,6 +3695,43 @@ static PyObject *_wrap_Atoms_net_wm_action_shade_get(PyObject *self, PyObject *a
 }
 
 
+static PyObject *_wrap_Atoms_net_wm_action_stick_set(PyObject *self, PyObject *args) {
+    PyObject *resultobj;
+    otk::Atoms *arg1 = (otk::Atoms *) 0 ;
+    Atom arg2 ;
+    PyObject * obj0  = 0 ;
+    PyObject * obj1  = 0 ;
+    
+    if(!PyArg_ParseTuple(args,(char *)"OO:Atoms_net_wm_action_stick_set",&obj0,&obj1)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Atoms,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    arg2 = (Atom) PyInt_AsLong(obj1);
+    if (PyErr_Occurred()) SWIG_fail;
+    if (arg1) (arg1)->net_wm_action_stick = arg2;
+    
+    Py_INCREF(Py_None); resultobj = Py_None;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
+static PyObject *_wrap_Atoms_net_wm_action_stick_get(PyObject *self, PyObject *args) {
+    PyObject *resultobj;
+    otk::Atoms *arg1 = (otk::Atoms *) 0 ;
+    Atom result;
+    PyObject * obj0  = 0 ;
+    
+    if(!PyArg_ParseTuple(args,(char *)"O:Atoms_net_wm_action_stick_get",&obj0)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Atoms,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    result = (Atom) ((arg1)->net_wm_action_stick);
+    
+    resultobj = PyInt_FromLong((long)result);
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_Atoms_net_wm_action_maximize_horz_set(PyObject *self, PyObject *args) {
     PyObject *resultobj;
     otk::Atoms *arg1 = (otk::Atoms *) 0 ;
@@ -3732,6 +3806,43 @@ static PyObject *_wrap_Atoms_net_wm_action_maximize_vert_get(PyObject *self, PyO
 }
 
 
+static PyObject *_wrap_Atoms_net_wm_action_fullscreen_set(PyObject *self, PyObject *args) {
+    PyObject *resultobj;
+    otk::Atoms *arg1 = (otk::Atoms *) 0 ;
+    Atom arg2 ;
+    PyObject * obj0  = 0 ;
+    PyObject * obj1  = 0 ;
+    
+    if(!PyArg_ParseTuple(args,(char *)"OO:Atoms_net_wm_action_fullscreen_set",&obj0,&obj1)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Atoms,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    arg2 = (Atom) PyInt_AsLong(obj1);
+    if (PyErr_Occurred()) SWIG_fail;
+    if (arg1) (arg1)->net_wm_action_fullscreen = arg2;
+    
+    Py_INCREF(Py_None); resultobj = Py_None;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
+static PyObject *_wrap_Atoms_net_wm_action_fullscreen_get(PyObject *self, PyObject *args) {
+    PyObject *resultobj;
+    otk::Atoms *arg1 = (otk::Atoms *) 0 ;
+    Atom result;
+    PyObject * obj0  = 0 ;
+    
+    if(!PyArg_ParseTuple(args,(char *)"O:Atoms_net_wm_action_fullscreen_get",&obj0)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Atoms,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    result = (Atom) ((arg1)->net_wm_action_fullscreen);
+    
+    resultobj = PyInt_FromLong((long)result);
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_Atoms_net_wm_action_change_desktop_set(PyObject *self, PyObject *args) {
     PyObject *resultobj;
     otk::Atoms *arg1 = (otk::Atoms *) 0 ;
@@ -9045,6 +9156,23 @@ static PyObject *_wrap_Client_shaded(PyObject *self, PyObject *args) {
 }
 
 
+static PyObject *_wrap_Client_fullscreen(PyObject *self, PyObject *args) {
+    PyObject *resultobj;
+    ob::Client *arg1 = (ob::Client *) 0 ;
+    bool result;
+    PyObject * obj0  = 0 ;
+    
+    if(!PyArg_ParseTuple(args,(char *)"O:Client_fullscreen",&obj0)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__Client,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    result = (bool)((ob::Client const *)arg1)->fullscreen();
+    
+    resultobj = PyInt_FromLong((long)result);
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_Client_iconic(PyObject *self, PyObject *args) {
     PyObject *resultobj;
     ob::Client *arg1 = (ob::Client *) 0 ;
@@ -9113,6 +9241,22 @@ static PyObject *_wrap_Client_layer(PyObject *self, PyObject *args) {
 }
 
 
+static PyObject *_wrap_Client_applyStartupState(PyObject *self, PyObject *args) {
+    PyObject *resultobj;
+    ob::Client *arg1 = (ob::Client *) 0 ;
+    PyObject * obj0  = 0 ;
+    
+    if(!PyArg_ParseTuple(args,(char *)"O:Client_applyStartupState",&obj0)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__Client,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    (arg1)->applyStartupState();
+    
+    Py_INCREF(Py_None); resultobj = Py_None;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_Client_toggleClientBorder(PyObject *self, PyObject *args) {
     PyObject *resultobj;
     ob::Client *arg1 = (ob::Client *) 0 ;
@@ -11289,12 +11433,18 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"Atoms_net_wm_action_move_get", _wrap_Atoms_net_wm_action_move_get, METH_VARARGS },
         { (char *)"Atoms_net_wm_action_resize_set", _wrap_Atoms_net_wm_action_resize_set, METH_VARARGS },
         { (char *)"Atoms_net_wm_action_resize_get", _wrap_Atoms_net_wm_action_resize_get, METH_VARARGS },
+        { (char *)"Atoms_net_wm_action_minimize_set", _wrap_Atoms_net_wm_action_minimize_set, METH_VARARGS },
+        { (char *)"Atoms_net_wm_action_minimize_get", _wrap_Atoms_net_wm_action_minimize_get, METH_VARARGS },
         { (char *)"Atoms_net_wm_action_shade_set", _wrap_Atoms_net_wm_action_shade_set, METH_VARARGS },
         { (char *)"Atoms_net_wm_action_shade_get", _wrap_Atoms_net_wm_action_shade_get, METH_VARARGS },
+        { (char *)"Atoms_net_wm_action_stick_set", _wrap_Atoms_net_wm_action_stick_set, METH_VARARGS },
+        { (char *)"Atoms_net_wm_action_stick_get", _wrap_Atoms_net_wm_action_stick_get, METH_VARARGS },
         { (char *)"Atoms_net_wm_action_maximize_horz_set", _wrap_Atoms_net_wm_action_maximize_horz_set, METH_VARARGS },
         { (char *)"Atoms_net_wm_action_maximize_horz_get", _wrap_Atoms_net_wm_action_maximize_horz_get, METH_VARARGS },
         { (char *)"Atoms_net_wm_action_maximize_vert_set", _wrap_Atoms_net_wm_action_maximize_vert_set, METH_VARARGS },
         { (char *)"Atoms_net_wm_action_maximize_vert_get", _wrap_Atoms_net_wm_action_maximize_vert_get, METH_VARARGS },
+        { (char *)"Atoms_net_wm_action_fullscreen_set", _wrap_Atoms_net_wm_action_fullscreen_set, METH_VARARGS },
+        { (char *)"Atoms_net_wm_action_fullscreen_get", _wrap_Atoms_net_wm_action_fullscreen_get, METH_VARARGS },
         { (char *)"Atoms_net_wm_action_change_desktop_set", _wrap_Atoms_net_wm_action_change_desktop_set, METH_VARARGS },
         { (char *)"Atoms_net_wm_action_change_desktop_get", _wrap_Atoms_net_wm_action_change_desktop_get, METH_VARARGS },
         { (char *)"Atoms_net_wm_action_close_set", _wrap_Atoms_net_wm_action_close_set, METH_VARARGS },
@@ -11513,10 +11663,12 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"Client_transientFor", _wrap_Client_transientFor, METH_VARARGS },
         { (char *)"Client_modal", _wrap_Client_modal, METH_VARARGS },
         { (char *)"Client_shaded", _wrap_Client_shaded, METH_VARARGS },
+        { (char *)"Client_fullscreen", _wrap_Client_fullscreen, METH_VARARGS },
         { (char *)"Client_iconic", _wrap_Client_iconic, METH_VARARGS },
         { (char *)"Client_maxVert", _wrap_Client_maxVert, METH_VARARGS },
         { (char *)"Client_maxHorz", _wrap_Client_maxHorz, METH_VARARGS },
         { (char *)"Client_layer", _wrap_Client_layer, METH_VARARGS },
+        { (char *)"Client_applyStartupState", _wrap_Client_applyStartupState, METH_VARARGS },
         { (char *)"Client_toggleClientBorder", _wrap_Client_toggleClientBorder, METH_VARARGS },
         { (char *)"Client_area", _wrap_Client_area, METH_VARARGS },
         { (char *)"Client_strut", _wrap_Client_strut, METH_VARARGS },
@@ -11840,6 +11992,8 @@ static swig_const_info swig_const_table[] = {
 { SWIG_PY_INT,     (char *)"Client_Func_Move", (long) ob::Client::Func_Move, 0, 0, 0},
 { SWIG_PY_INT,     (char *)"Client_Func_Iconify", (long) ob::Client::Func_Iconify, 0, 0, 0},
 { SWIG_PY_INT,     (char *)"Client_Func_Maximize", (long) ob::Client::Func_Maximize, 0, 0, 0},
+{ SWIG_PY_INT,     (char *)"Client_Func_Shade", (long) ob::Client::Func_Shade, 0, 0, 0},
+{ SWIG_PY_INT,     (char *)"Client_Func_Fullscreen", (long) ob::Client::Func_Fullscreen, 0, 0, 0},
 { SWIG_PY_INT,     (char *)"Client_Func_Close", (long) ob::Client::Func_Close, 0, 0, 0},
 { SWIG_PY_INT,     (char *)"Client_Decor_Titlebar", (long) ob::Client::Decor_Titlebar, 0, 0, 0},
 { SWIG_PY_INT,     (char *)"Client_Decor_Handle", (long) ob::Client::Decor_Handle, 0, 0, 0},
index b95c1908a1b8aae6e51cc5ffb5a47dd53c13202b..0bbcebc6d8d694de53f06a283ef53b7147e75d23 100644 (file)
@@ -328,16 +328,18 @@ void Screen::changeSupportedAtoms()
     otk::Property::atoms.net_wm_moveresize_size_bottomright,
     otk::Property::atoms.net_wm_moveresize_move,
 */
-/*
     otk::Property::atoms.net_wm_allowed_actions,
     otk::Property::atoms.net_wm_action_move,
     otk::Property::atoms.net_wm_action_resize,
+    otk::Property::atoms.net_wm_action_minimize,
     otk::Property::atoms.net_wm_action_shade,
+/*    otk::Property::atoms.net_wm_action_stick,*/
     otk::Property::atoms.net_wm_action_maximize_horz,
     otk::Property::atoms.net_wm_action_maximize_vert,
+    otk::Property::atoms.net_wm_action_fullscreen,
     otk::Property::atoms.net_wm_action_change_desktop,
     otk::Property::atoms.net_wm_action_close,
-*/
+
     otk::Property::atoms.net_wm_state,
     otk::Property::atoms.net_wm_state_modal,
     otk::Property::atoms.net_wm_state_maximized_vert,
@@ -503,8 +505,8 @@ void Screen::manageWindow(Window window)
       client->desktop() == (signed)0xffffffff) {
     client->frame->show();
   }
-  // XXX: handle any requested states such as maximized
+
+  client->applyStartupState();
 
   otk::display->ungrab();
 
This page took 0.041235 seconds and 4 git commands to generate.