]> Dogcows Code - chaz/openbox/commitdiff
remove includes for widgetbase.hh. fix bug with circular modal pointer.
authorDana Jansens <danakj@orodu.net>
Sat, 8 Feb 2003 10:48:19 +0000 (10:48 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 8 Feb 2003 10:48:19 +0000 (10:48 +0000)
src/actions.hh
src/client.cc
src/screen.cc
src/screen.hh

index f8f03d0f213d4c724b692d4aaa0945b3022503b6..f18696a10526426da996cf74f5f42bc94f56b03e 100644 (file)
@@ -6,7 +6,6 @@
   @brief The action interface for user-available actions
 */
 
-#include "widgetbase.hh"
 #include "otk/point.hh"
 #include "otk/rect.hh"
 #include "otk/eventhandler.hh"
index d5be00d01822b8b64f7796180eeea9f0035dfda0..e78336d3966b50bd152668685a5c67c018af8dbc 100644 (file)
@@ -821,6 +821,7 @@ void Client::setModal(bool modal)
     Client *c = this;
     while (c->_transient_for) {
       c = c->_transient_for;
+      if (c == this) break; // circular?
       if (c->_modal_child) break; // already has a modal child
       c->_modal_child = this;
     }
@@ -836,7 +837,9 @@ void Client::setModal(bool modal)
     c = this;
     while (c->_transient_for) {
       c = c->_transient_for;
+      if (c == this) break; // circular?
       if (c->_modal_child != this) break; // has a different modal child
+      if (c == replacement) break; // found the replacement itself
       c->_modal_child = replacement;
     }
   }
index 41cc6e4c9a3414d03d5849f573bf0dab7e4dfb05..4878d7b658296e8c4871dce71019792191764d92 100644 (file)
@@ -47,8 +47,7 @@ namespace ob {
 
 
 Screen::Screen(int screen)
-  : WidgetBase(WidgetBase::Type_Root),
-    _number(screen)
+  : _number(screen)
 {
   assert(screen >= 0); assert(screen < ScreenCount(**otk::display));
   _info = otk::display->screenInfo(screen);
index db8c26d199c7b4d48049d390c4685c95d60f4597..9244bb2d594ad88593100ad83d56376939cb03e0 100644 (file)
@@ -10,7 +10,6 @@ extern "C" {
 #include <X11/Xlib.h>
 }
 
-#include "widgetbase.hh"
 #include "otk/strut.hh"
 #include "otk/rect.hh"
 #include "otk/screeninfo.hh"
@@ -28,7 +27,7 @@ class Client;
 //! Manages a single screen
 /*!
 */
-class Screen : public otk::EventHandler, public WidgetBase {
+class Screen : public otk::EventHandler {
 public:
   //! Holds a list of otk::Strut objects
   typedef std::list<otk::Strut*> StrutList;
This page took 0.027806 seconds and 4 git commands to generate.