X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fclient.cc;h=eeb09a374981a4fe5cfe9dc30d3f6386c6faa980;hb=5face4c6f35172761367f63ac0b6eaf62d84e532;hp=473c37f8f98fe8e33885059de69b45330abe4bb5;hpb=ab2968b3a5d61e2dc6b0a64153a7abb0078ee442;p=chaz%2Fopenbox diff --git a/src/client.cc b/src/client.cc index 473c37f8..eeb09a37 100644 --- a/src/client.cc +++ b/src/client.cc @@ -76,7 +76,7 @@ Client::Client(int screen, Window window) updateStrut(); // this makes sure that these windows appear on all desktops - if (_type == Type_Dock || _type == Type_Desktop) + if (/*_type == Type_Dock ||*/ _type == Type_Desktop) _desktop = 0xffffffff; // set the desktop hint, to make sure that it always exists, and to reflect @@ -129,9 +129,13 @@ void Client::getDesktop() // defaults to the current desktop _desktop = openbox->screen(_screen)->desktop(); - otk::Property::get(_window, otk::Property::atoms.net_wm_desktop, - otk::Property::atoms.cardinal, - (long unsigned*)&_desktop); + if (otk::Property::get(_window, otk::Property::atoms.net_wm_desktop, + otk::Property::atoms.cardinal, + (long unsigned*)&_desktop)) { +#ifdef DEBUG +// printf("Window requested desktop: %ld\n", _desktop); +#endif + } } @@ -487,6 +491,10 @@ void Client::updateWMHints(bool initstate) if (ur != _urgent) { _urgent = ur; +#ifdef DEBUG + printf("DEBUG: Urgent Hint for 0x%lx: %s\n", + (long)_window, _urgent ? "ON" : "OFF"); +#endif // fire the urgent callback if we're mapped, otherwise, wait until after // we're mapped if (_urgent && frame) @@ -567,8 +575,8 @@ void Client::updateStrut() _strut.left = data[0]; _strut.right = data[1]; _strut.top = data[2]; - _strut.bottom = data[3]; - + _strut.bottom = data[3]; + openbox->screen(_screen)->updateStrut(); } @@ -1173,7 +1181,6 @@ void Client::applyStartupState() // these are in a carefully crafted order.. if (_iconic) { - printf("MAP ICONIC\n"); _iconic = false; setDesktop(ICONIC_DESKTOP); } @@ -1201,8 +1208,8 @@ void Client::applyStartupState() void Client::fireUrgent() { - // call the python UrgentNotify callbacks - EventData data(_screen, this, EventUrgentNotify, 0); + // call the python UrgentWindow callbacks + EventData data(_screen, this, EventAction::UrgentWindow, 0); openbox->bindings()->fireEvent(&data); } @@ -1427,7 +1434,7 @@ void Client::unmapHandler(const XUnmapEvent &e) { if (ignore_unmaps) { #ifdef DEBUG - printf("Ignored UnmapNotify for 0x%lx (event 0x%lx)\n", e.window, e.event); +// printf("Ignored UnmapNotify for 0x%lx (event 0x%lx)\n", e.window, e.event); #endif // DEBUG ignore_unmaps--; return;