aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-02-20 22:41:13 (GMT)
committerfluxgen <fluxgen>2002-02-20 22:41:13 (GMT)
commitef969ea966fc15138f927392262558e99d359bbd (patch)
tree4aa585c41cf525ee9fc79994de3e8fefefe7c506 /src
parent36dbf60573ae2bd0cbb299a059f1eac9a8bf246f (diff)
downloadfluxbox-ef969ea966fc15138f927392262558e99d359bbd.zip
fluxbox-ef969ea966fc15138f927392262558e99d359bbd.tar.bz2
added updateGnomeClientList
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc44
-rw-r--r--src/Screen.hh20
2 files changed, 47 insertions, 17 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 8444480..f3a833c 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.cc,v 1.25 2002/02/17 19:19:05 fluxgen Exp $ 25// $Id: Screen.cc,v 1.26 2002/02/20 22:40:19 fluxgen Exp $
26 26
27// stupid macros needed to access some functions in version 2 of the GNU C 27// stupid macros needed to access some functions in version 2 of the GNU C
28// library 28// library
@@ -702,6 +702,7 @@ void BScreen::addIcon(FluxboxWindow *w) {
702 702
703void BScreen::removeIcon(FluxboxWindow *w) { 703void BScreen::removeIcon(FluxboxWindow *w) {
704 if (! w) return; 704 if (! w) return;
705
705 { 706 {
706 Icons::iterator it = iconList.begin(); 707 Icons::iterator it = iconList.begin();
707 Icons::iterator it_end = iconList.end(); 708 Icons::iterator it_end = iconList.end();
@@ -712,8 +713,7 @@ void BScreen::removeIcon(FluxboxWindow *w) {
712 } 713 }
713 } 714 }
714 } 715 }
715 //std::remove(iconList.begin(), iconList.end(), w); 716
716
717 iconmenu->remove(w->getWindowNumber()); 717 iconmenu->remove(w->getWindowNumber());
718 iconmenu->update(); 718 iconmenu->update();
719 toolbar->delIcon(w); 719 toolbar->delIcon(w);
@@ -925,7 +925,10 @@ void BScreen::updateNetizenWindowAdd(Window w, unsigned long p) {
925 for (; it != it_end; ++it) { 925 for (; it != it_end; ++it) {
926 (*it)->sendWindowAdd(w, p); 926 (*it)->sendWindowAdd(w, p);
927 } 927 }
928 928 #ifdef GNOME
929 updateGnomeClientList();
930 #endif
931
929} 932}
930 933
931 934
@@ -935,7 +938,9 @@ void BScreen::updateNetizenWindowDel(Window w) {
935 for (; it != it_end; ++it) { 938 for (; it != it_end; ++it) {
936 (*it)->sendWindowDel(w); 939 (*it)->sendWindowDel(w);
937 } 940 }
938 941 #ifdef GNOME
942 updateGnomeClientList();
943 #endif
939} 944}
940 945
941 946
@@ -967,7 +972,7 @@ void BScreen::updateNetizenConfigNotify(XEvent *e) {
967 972
968 973
969void BScreen::raiseWindows(Window *workspace_stack, int num) { 974void BScreen::raiseWindows(Window *workspace_stack, int num) {
970 Window session_stack[(num + workspacesList.size() + rootmenuList.size() + 13)]; 975 Window session_stack[(num + workspacesList.size() + rootmenuList.size() + 30)];
971 int i = 0; 976 int i = 0;
972 977
973 XRaiseWindow(getBaseDisplay()->getXDisplay(), iconmenu->getWindowID()); 978 XRaiseWindow(getBaseDisplay()->getXDisplay(), iconmenu->getWindowID());
@@ -1761,7 +1766,8 @@ void BScreen::initGnomeAtoms(void) {
1761 getBaseDisplay()->getGnomeWorkspaceCountAtom(), 1766 getBaseDisplay()->getGnomeWorkspaceCountAtom(),
1762 getBaseDisplay()->getGnomeStateAtom(), 1767 getBaseDisplay()->getGnomeStateAtom(),
1763 getBaseDisplay()->getGnomeWorkspaceNamesAtom(), 1768 getBaseDisplay()->getGnomeWorkspaceNamesAtom(),
1764 getBaseDisplay()->getGnomeHintsAtom() 1769 getBaseDisplay()->getGnomeHintsAtom(),
1770 getBaseDisplay()->getGnomeClientListAtom(),
1765 }; 1771 };
1766 1772
1767 //list atoms that we support 1773 //list atoms that we support
@@ -1770,4 +1776,28 @@ void BScreen::initGnomeAtoms(void) {
1770 (unsigned char *)gnomeatomlist, (sizeof gnomeatomlist)/sizeof gnomeatomlist[0]); 1776 (unsigned char *)gnomeatomlist, (sizeof gnomeatomlist)/sizeof gnomeatomlist[0]);
1771 1777
1772} 1778}
1779
1780void BScreen::updateGnomeClientList() {
1781 int num = getCurrentWorkspace()->getWindowList().size();
1782 Window *wl = new Window[num];
1783 // Fill in array of window ID's
1784 Workspace::Windows::iterator it = getCurrentWorkspace()->getWindowList().begin();
1785 Workspace::Windows::iterator it_end = getCurrentWorkspace()->getWindowList().end();
1786 int win=0;
1787 for (; it != it_end; ++it) {
1788 //check if the window don't want to be visible in the list
1789 if (! ( (*it)->getGnomeHints() & FluxboxWindow::WIN_STATE_HIDDEN) ) {
1790 wl[win++] = (*it)->getClientWindow();
1791 }
1792 }
1793
1794 num = win;
1795 XChangeProperty(getBaseDisplay()->getXDisplay(),
1796 getRootWindow(), getBaseDisplay()->getGnomeClientListAtom(), XA_CARDINAL, 32,
1797 PropModeReplace, (unsigned char *)wl, num);
1798
1799 if (wl)
1800 delete wl;
1801}
1802
1773#endif //!GNOME 1803#endif //!GNOME
diff --git a/src/Screen.hh b/src/Screen.hh
index b64664c..0001ed0 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.hh,v 1.18 2002/02/17 18:54:58 fluxgen Exp $ 25// $Id: Screen.hh,v 1.19 2002/02/20 22:41:13 fluxgen Exp $
26 26
27#ifndef SCREEN_HH 27#ifndef SCREEN_HH
28#define SCREEN_HH 28#define SCREEN_HH
@@ -165,15 +165,15 @@ public:
165 inline Iconmenu *getIconmenu(void) { return iconmenu; } 165 inline Iconmenu *getIconmenu(void) { return iconmenu; }
166 166
167 167
168#ifdef HAVE_STRFTIME 168 #ifdef HAVE_STRFTIME
169 inline char *getStrftimeFormat(void) { return resource.strftime_format; } 169 inline char *getStrftimeFormat(void) { return resource.strftime_format; }
170 void saveStrftimeFormat(char *); 170 void saveStrftimeFormat(char *);
171#else // !HAVE_STRFTIME 171 #else // !HAVE_STRFTIME
172 inline int getDateFormat(void) { return resource.date_format; } 172 inline int getDateFormat(void) { return resource.date_format; }
173 inline void saveDateFormat(int f) { resource.date_format = f; } 173 inline void saveDateFormat(int f) { resource.date_format = f; }
174 inline Bool isClock24Hour(void) { return resource.clock24hour; } 174 inline Bool isClock24Hour(void) { return resource.clock24hour; }
175 inline void saveClock24Hour(Bool c) { resource.clock24hour = c; } 175 inline void saveClock24Hour(Bool c) { resource.clock24hour = c; }
176#endif // HAVE_STRFTIME 176 #endif // HAVE_STRFTIME
177 177
178 inline Theme::WindowStyle *getWindowStyle(void) { return &theme->getWindowStyle(); } 178 inline Theme::WindowStyle *getWindowStyle(void) { return &theme->getWindowStyle(); }
179 inline Theme::MenuStyle *getMenuStyle(void) { return &theme->getMenuStyle(); } 179 inline Theme::MenuStyle *getMenuStyle(void) { return &theme->getMenuStyle(); }
@@ -231,6 +231,7 @@ public:
231private: 231private:
232 #ifdef GNOME 232 #ifdef GNOME
233 void initGnomeAtoms(); 233 void initGnomeAtoms();
234 void updateGnomeClientList();
234 Window gnome_win; 235 Window gnome_win;
235 #endif 236 #endif
236 Theme *theme; 237 Theme *theme;
@@ -291,19 +292,18 @@ private:
291 Resource<Toolbar::Placement> toolbar_placement; 292 Resource<Toolbar::Placement> toolbar_placement;
292 293
293 294
294#ifdef SLIT 295 #ifdef SLIT
295 Bool slit_on_top, slit_auto_hide; 296 Bool slit_on_top, slit_auto_hide;
296 int slit_placement, slit_direction; 297 int slit_placement, slit_direction;
297#endif // SLIT 298 #endif // SLIT
298 299
299 300
300#ifdef HAVE_STRFTIME 301 #ifdef HAVE_STRFTIME
301 char *strftime_format; 302 char *strftime_format;
302#else // !HAVE_STRFTIME 303 #else // !HAVE_STRFTIME
303 Bool clock24hour; 304 Bool clock24hour;
304 int date_format; 305 int date_format;
305#endif // HAVE_STRFTIME 306 #endif // HAVE_STRFTIME
306
307 307
308 } resource; 308 } resource;
309 309