all repos — fluxbox @ ef969ea966fc15138f927392262558e99d359bbd

custom fork of the fluxbox windowmanager

added updateGnomeClientList
fluxgen fluxgen
commit

ef969ea966fc15138f927392262558e99d359bbd

parent

36dbf60573ae2bd0cbb299a059f1eac9a8bf246f

2 files changed, 47 insertions(+), 17 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.25 2002/02/17 19:19:05 fluxgen Exp $ +// $Id: Screen.cc,v 1.26 2002/02/20 22:40:19 fluxgen Exp $ // stupid macros needed to access some functions in version 2 of the GNU C // library

@@ -702,6 +702,7 @@

void BScreen::removeIcon(FluxboxWindow *w) { if (! w) return; + { Icons::iterator it = iconList.begin(); Icons::iterator it_end = iconList.end();

@@ -712,8 +713,7 @@ break;

} } } - //std::remove(iconList.begin(), iconList.end(), w); - + iconmenu->remove(w->getWindowNumber()); iconmenu->update(); toolbar->delIcon(w);

@@ -925,7 +925,10 @@ Netizens::iterator it_end = netizenList.end();

for (; it != it_end; ++it) { (*it)->sendWindowAdd(w, p); } - + #ifdef GNOME + updateGnomeClientList(); + #endif + }

@@ -935,7 +938,9 @@ Netizens::iterator it_end = netizenList.end();

for (; it != it_end; ++it) { (*it)->sendWindowDel(w); } - + #ifdef GNOME + updateGnomeClientList(); + #endif }

@@ -967,7 +972,7 @@ }

void BScreen::raiseWindows(Window *workspace_stack, int num) { - Window session_stack[(num + workspacesList.size() + rootmenuList.size() + 13)]; + Window session_stack[(num + workspacesList.size() + rootmenuList.size() + 30)]; int i = 0; XRaiseWindow(getBaseDisplay()->getXDisplay(), iconmenu->getWindowID());

@@ -1761,7 +1766,8 @@ getBaseDisplay()->getGnomeWorkspaceAtom(),

getBaseDisplay()->getGnomeWorkspaceCountAtom(), getBaseDisplay()->getGnomeStateAtom(), getBaseDisplay()->getGnomeWorkspaceNamesAtom(), - getBaseDisplay()->getGnomeHintsAtom() + getBaseDisplay()->getGnomeHintsAtom(), + getBaseDisplay()->getGnomeClientListAtom(), }; //list atoms that we support

@@ -1770,4 +1776,28 @@ getBaseDisplay()->getGnomeProtAtom(), XA_ATOM, 32, PropModeReplace,

(unsigned char *)gnomeatomlist, (sizeof gnomeatomlist)/sizeof gnomeatomlist[0]); } + +void BScreen::updateGnomeClientList() { + int num = getCurrentWorkspace()->getWindowList().size(); + Window *wl = new Window[num]; + // Fill in array of window ID's + Workspace::Windows::iterator it = getCurrentWorkspace()->getWindowList().begin(); + Workspace::Windows::iterator it_end = getCurrentWorkspace()->getWindowList().end(); + int win=0; + for (; it != it_end; ++it) { + //check if the window don't want to be visible in the list + if (! ( (*it)->getGnomeHints() & FluxboxWindow::WIN_STATE_HIDDEN) ) { + wl[win++] = (*it)->getClientWindow(); + } + } + + num = win; + XChangeProperty(getBaseDisplay()->getXDisplay(), + getRootWindow(), getBaseDisplay()->getGnomeClientListAtom(), XA_CARDINAL, 32, + PropModeReplace, (unsigned char *)wl, num); + + if (wl) + delete wl; +} + #endif //!GNOME
M src/Screen.hhsrc/Screen.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.18 2002/02/17 18:54:58 fluxgen Exp $ +// $Id: Screen.hh,v 1.19 2002/02/20 22:41:13 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH

@@ -165,15 +165,15 @@ inline void iconUpdate(void) { iconmenu->update(); }

inline Iconmenu *getIconmenu(void) { return iconmenu; } -#ifdef HAVE_STRFTIME + #ifdef HAVE_STRFTIME inline char *getStrftimeFormat(void) { return resource.strftime_format; } void saveStrftimeFormat(char *); -#else // !HAVE_STRFTIME + #else // !HAVE_STRFTIME inline int getDateFormat(void) { return resource.date_format; } inline void saveDateFormat(int f) { resource.date_format = f; } inline Bool isClock24Hour(void) { return resource.clock24hour; } inline void saveClock24Hour(Bool c) { resource.clock24hour = c; } -#endif // HAVE_STRFTIME + #endif // HAVE_STRFTIME inline Theme::WindowStyle *getWindowStyle(void) { return &theme->getWindowStyle(); } inline Theme::MenuStyle *getMenuStyle(void) { return &theme->getMenuStyle(); }

@@ -231,6 +231,7 @@

private: #ifdef GNOME void initGnomeAtoms(); + void updateGnomeClientList(); Window gnome_win; #endif Theme *theme;

@@ -291,19 +292,18 @@ Resource<Tab::Alignment> tab_alignment;

Resource<Toolbar::Placement> toolbar_placement; -#ifdef SLIT + #ifdef SLIT Bool slit_on_top, slit_auto_hide; int slit_placement, slit_direction; -#endif // SLIT + #endif // SLIT -#ifdef HAVE_STRFTIME + #ifdef HAVE_STRFTIME char *strftime_format; -#else // !HAVE_STRFTIME + #else // !HAVE_STRFTIME Bool clock24hour; int date_format; -#endif // HAVE_STRFTIME - + #endif // HAVE_STRFTIME } resource;