diff options
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 44 |
1 files changed, 37 insertions, 7 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 | ||
703 | void BScreen::removeIcon(FluxboxWindow *w) { | 703 | void 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 | ||
969 | void BScreen::raiseWindows(Window *workspace_stack, int num) { | 974 | void 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 | |||
1780 | void 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 |