#ifdef DEBUG
printf("net_active_window for 0x%lx\n", _window);
#endif
+ if (openbox->screen(_screen)->showingDesktop())
+ openbox->screen(_screen)->showDesktop(false);
if (_iconic)
iconify(false);
+ else if (!frame->visible()) // if its not visible for other reasons, then
+ return; // don't mess with it
if (_shaded)
shade(false);
focus();
openbox->screen(_screen)->raiseWindow(this);
} else if (e.message_type == otk::Property::atoms.openbox_active_window) {
+ if (openbox->screen(_screen)->showingDesktop())
+ openbox->screen(_screen)->showDesktop(false);
if (_iconic)
iconify(false);
+ else if (!frame->visible()) // if its not visible for other reasons, then
+ return; // don't mess with it
if (e.data.l[0] && _shaded)
shade(false);
focus();
{
if (_iconic == iconic) return; // nothing to do
+#ifdef DEBUG
+ printf("%sconifying window: 0x%lx\n", (iconic ? "I" : "Uni"), _window);
+#endif
+
_iconic = iconic;
if (_iconic) {
if (show) {
Client *c = openbox->focusedClient();
if (c) saved_focus = c->window();
- } else {
- Client *f = openbox->focusedClient();
- if (!f || f->type() == Client::Type_Desktop) {
- Client *c = openbox->findClient(saved_focus);
- if (c) c->focus();
- }
}
_showing_desktop = show;
+
ClientList::iterator it, end = clients.end();
for (it = clients.begin(); it != end; ++it) {
if ((*it)->type() == Client::Type_Desktop) {
} else
(*it)->showhide();
}
+
+ if (!show) {
+ Client *f = openbox->focusedClient();
+ if (!f || f->type() == Client::Type_Desktop) {
+ Client *c = openbox->findClient(saved_focus);
+ if (c) c->focus();
+ }
+ }
+
+ otk::Property::set(_info->rootWindow(),
+ otk::Property::atoms.net_showing_desktop,
+ otk::Property::atoms.cardinal,
+ show ? 1 : 0);
}
void Screen::propertyHandler(const XPropertyEvent &e)
*/
void changeNumDesktops(unsigned int num);
- //! Shows and focuses the desktop and hides all the client windows, or
- //! returns to the normal state, showing client windows.
- void showDesktop(bool show);
-
public:
#ifndef SWIG
//! Constructs a new Screen object
const DesktopLayout& desktopLayout() const { return _layout; }
+ //! Shows and focuses the desktop and hides all the client windows, or
+ //! returns to the normal state, showing client windows.
+ void showDesktop(bool show);
+
//! Update's the screen's combined strut of all the clients.
/*!
Clients should call this whenever they change their strut.
}
};
+// do this through events
+%ignore ob::Screen::showDesktop(bool);
+
%import "otk.i"
%import "actions.hh"