remove includes for widgetbase.hh. fix bug with circular modal pointer.
This commit is contained in:
parent
c54d92b784
commit
9e05db9518
4 changed files with 5 additions and 5 deletions
|
@ -6,7 +6,6 @@
|
||||||
@brief The action interface for user-available actions
|
@brief The action interface for user-available actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "widgetbase.hh"
|
|
||||||
#include "otk/point.hh"
|
#include "otk/point.hh"
|
||||||
#include "otk/rect.hh"
|
#include "otk/rect.hh"
|
||||||
#include "otk/eventhandler.hh"
|
#include "otk/eventhandler.hh"
|
||||||
|
|
|
@ -821,6 +821,7 @@ void Client::setModal(bool modal)
|
||||||
Client *c = this;
|
Client *c = this;
|
||||||
while (c->_transient_for) {
|
while (c->_transient_for) {
|
||||||
c = c->_transient_for;
|
c = c->_transient_for;
|
||||||
|
if (c == this) break; // circular?
|
||||||
if (c->_modal_child) break; // already has a modal child
|
if (c->_modal_child) break; // already has a modal child
|
||||||
c->_modal_child = this;
|
c->_modal_child = this;
|
||||||
}
|
}
|
||||||
|
@ -836,7 +837,9 @@ void Client::setModal(bool modal)
|
||||||
c = this;
|
c = this;
|
||||||
while (c->_transient_for) {
|
while (c->_transient_for) {
|
||||||
c = 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->_modal_child != this) break; // has a different modal child
|
||||||
|
if (c == replacement) break; // found the replacement itself
|
||||||
c->_modal_child = replacement;
|
c->_modal_child = replacement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,8 +47,7 @@ namespace ob {
|
||||||
|
|
||||||
|
|
||||||
Screen::Screen(int screen)
|
Screen::Screen(int screen)
|
||||||
: WidgetBase(WidgetBase::Type_Root),
|
: _number(screen)
|
||||||
_number(screen)
|
|
||||||
{
|
{
|
||||||
assert(screen >= 0); assert(screen < ScreenCount(**otk::display));
|
assert(screen >= 0); assert(screen < ScreenCount(**otk::display));
|
||||||
_info = otk::display->screenInfo(screen);
|
_info = otk::display->screenInfo(screen);
|
||||||
|
|
|
@ -10,7 +10,6 @@ extern "C" {
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "widgetbase.hh"
|
|
||||||
#include "otk/strut.hh"
|
#include "otk/strut.hh"
|
||||||
#include "otk/rect.hh"
|
#include "otk/rect.hh"
|
||||||
#include "otk/screeninfo.hh"
|
#include "otk/screeninfo.hh"
|
||||||
|
@ -28,7 +27,7 @@ class Client;
|
||||||
//! Manages a single screen
|
//! Manages a single screen
|
||||||
/*!
|
/*!
|
||||||
*/
|
*/
|
||||||
class Screen : public otk::EventHandler, public WidgetBase {
|
class Screen : public otk::EventHandler {
|
||||||
public:
|
public:
|
||||||
//! Holds a list of otk::Strut objects
|
//! Holds a list of otk::Strut objects
|
||||||
typedef std::list<otk::Strut*> StrutList;
|
typedef std::list<otk::Strut*> StrutList;
|
||||||
|
|
Loading…
Reference in a new issue