diff options
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 6a2485e..cdc6bcd 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.58 2002/07/23 17:11:59 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.59 2002/08/02 12:52:44 fluxgen Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -474,7 +474,7 @@ namespace { | |||
474 | } | 474 | } |
475 | } | 475 | } |
476 | 476 | ||
477 | BScreen::~BScreen(void) { | 477 | BScreen::~BScreen() { |
478 | #ifdef GNOME | 478 | #ifdef GNOME |
479 | XDestroyWindow(getBaseDisplay()->getXDisplay(), gnome_win); | 479 | XDestroyWindow(getBaseDisplay()->getXDisplay(), gnome_win); |
480 | #endif | 480 | #endif |
@@ -548,7 +548,7 @@ BScreen::~BScreen(void) { | |||
548 | 548 | ||
549 | } | 549 | } |
550 | 550 | ||
551 | void BScreen::reconfigure(void) { | 551 | void BScreen::reconfigure() { |
552 | #ifdef DEBUG | 552 | #ifdef DEBUG |
553 | cerr<<__FILE__<<"("<<__LINE__<<"): BScreen::reconfigure"<<endl; | 553 | cerr<<__FILE__<<"("<<__LINE__<<"): BScreen::reconfigure"<<endl; |
554 | #endif | 554 | #endif |
@@ -653,7 +653,7 @@ void BScreen::reconfigure(void) { | |||
653 | } | 653 | } |
654 | 654 | ||
655 | 655 | ||
656 | void BScreen::rereadMenu(void) { | 656 | void BScreen::rereadMenu() { |
657 | initMenu(); | 657 | initMenu(); |
658 | raiseWindows(0, 0); | 658 | raiseWindows(0, 0); |
659 | 659 | ||
@@ -661,11 +661,11 @@ void BScreen::rereadMenu(void) { | |||
661 | } | 661 | } |
662 | 662 | ||
663 | 663 | ||
664 | void BScreen::removeWorkspaceNames(void) { | 664 | void BScreen::removeWorkspaceNames() { |
665 | workspaceNames.erase(workspaceNames.begin(), workspaceNames.end()); | 665 | workspaceNames.erase(workspaceNames.begin(), workspaceNames.end()); |
666 | } | 666 | } |
667 | 667 | ||
668 | void BScreen::updateWorkspaceNamesAtom(void) { | 668 | void BScreen::updateWorkspaceNamesAtom() { |
669 | 669 | ||
670 | #ifdef GNOME | 670 | #ifdef GNOME |
671 | XTextProperty text; | 671 | XTextProperty text; |
@@ -741,7 +741,7 @@ FluxboxWindow *BScreen::getIcon(unsigned int index) { | |||
741 | } | 741 | } |
742 | 742 | ||
743 | 743 | ||
744 | int BScreen::addWorkspace(void) { | 744 | int BScreen::addWorkspace() { |
745 | Workspace *wkspc = new Workspace(this, workspacesList.size()); | 745 | Workspace *wkspc = new Workspace(this, workspacesList.size()); |
746 | workspacesList.push_back(wkspc); | 746 | workspacesList.push_back(wkspc); |
747 | //add workspace to workspacemenu | 747 | //add workspace to workspacemenu |
@@ -760,7 +760,7 @@ int BScreen::addWorkspace(void) { | |||
760 | } | 760 | } |
761 | 761 | ||
762 | 762 | ||
763 | int BScreen::removeLastWorkspace(void) { | 763 | int BScreen::removeLastWorkspace() { |
764 | if (workspacesList.size() > 1) { | 764 | if (workspacesList.size() > 1) { |
765 | Workspace *wkspc = workspacesList.back(); | 765 | Workspace *wkspc = workspacesList.back(); |
766 | 766 | ||
@@ -888,7 +888,7 @@ void BScreen::removeNetizen(Window w) { | |||
888 | } | 888 | } |
889 | 889 | ||
890 | 890 | ||
891 | void BScreen::updateNetizenCurrentWorkspace(void) { | 891 | void BScreen::updateNetizenCurrentWorkspace() { |
892 | #ifdef NEWWMSPEC | 892 | #ifdef NEWWMSPEC |
893 | //update _NET_WM_CURRENT_DESKTOP | 893 | //update _NET_WM_CURRENT_DESKTOP |
894 | int workspace = getCurrentWorkspaceID(); | 894 | int workspace = getCurrentWorkspaceID(); |
@@ -914,7 +914,7 @@ void BScreen::updateNetizenCurrentWorkspace(void) { | |||
914 | } | 914 | } |
915 | 915 | ||
916 | 916 | ||
917 | void BScreen::updateNetizenWorkspaceCount(void) { | 917 | void BScreen::updateNetizenWorkspaceCount() { |
918 | 918 | ||
919 | Netizens::iterator it = netizenList.begin(); | 919 | Netizens::iterator it = netizenList.begin(); |
920 | Netizens::iterator it_end = netizenList.end(); | 920 | Netizens::iterator it_end = netizenList.end(); |
@@ -941,7 +941,7 @@ void BScreen::updateNetizenWorkspaceCount(void) { | |||
941 | } | 941 | } |
942 | 942 | ||
943 | 943 | ||
944 | void BScreen::updateNetizenWindowFocus(void) { | 944 | void BScreen::updateNetizenWindowFocus() { |
945 | 945 | ||
946 | Netizens::iterator it = netizenList.begin(); | 946 | Netizens::iterator it = netizenList.begin(); |
947 | Netizens::iterator it_end = netizenList.end(); | 947 | Netizens::iterator it_end = netizenList.end(); |
@@ -1194,7 +1194,7 @@ void BScreen::prevFocus(int opts) { | |||
1194 | //--------- raiseFocus ----------- | 1194 | //--------- raiseFocus ----------- |
1195 | // Raise the current focused window | 1195 | // Raise the current focused window |
1196 | //-------------------------------- | 1196 | //-------------------------------- |
1197 | void BScreen::raiseFocus(void) { | 1197 | void BScreen::raiseFocus() { |
1198 | bool have_focused = false; | 1198 | bool have_focused = false; |
1199 | int focused_window_number = -1; | 1199 | int focused_window_number = -1; |
1200 | 1200 | ||
@@ -1210,7 +1210,7 @@ void BScreen::raiseFocus(void) { | |||
1210 | raiseWindow(fluxbox->getFocusedWindow()); | 1210 | raiseWindow(fluxbox->getFocusedWindow()); |
1211 | } | 1211 | } |
1212 | 1212 | ||
1213 | void BScreen::initMenu(void) { | 1213 | void BScreen::initMenu() { |
1214 | I18n *i18n = I18n::instance(); | 1214 | I18n *i18n = I18n::instance(); |
1215 | 1215 | ||
1216 | if (rootmenu) { | 1216 | if (rootmenu) { |
@@ -1571,7 +1571,7 @@ void BScreen::createStyleMenu(Rootmenu *menu, bool newmenu, const char *label, c | |||
1571 | 1571 | ||
1572 | } | 1572 | } |
1573 | 1573 | ||
1574 | void BScreen::shutdown(void) { | 1574 | void BScreen::shutdown() { |
1575 | fluxbox->grab(); | 1575 | fluxbox->grab(); |
1576 | 1576 | ||
1577 | XSelectInput(getBaseDisplay()->getXDisplay(), getRootWindow(), NoEventMask); | 1577 | XSelectInput(getBaseDisplay()->getXDisplay(), getRootWindow(), NoEventMask); |
@@ -1688,7 +1688,7 @@ void BScreen::showGeometry(unsigned int gx, unsigned int gy) { | |||
1688 | } | 1688 | } |
1689 | 1689 | ||
1690 | 1690 | ||
1691 | void BScreen::hideGeometry(void) { | 1691 | void BScreen::hideGeometry() { |
1692 | if (geom_visible) { | 1692 | if (geom_visible) { |
1693 | XUnmapWindow(getBaseDisplay()->getXDisplay(), geom_window); | 1693 | XUnmapWindow(getBaseDisplay()->getXDisplay(), geom_window); |
1694 | geom_visible = false; | 1694 | geom_visible = false; |
@@ -1735,8 +1735,17 @@ bool BScreen::doSkipWindow(const FluxboxWindow *w, int opts) { | |||
1735 | (opts & CYCLESKIPSHADED) != 0 && w->isShaded()); // skip if shaded | 1735 | (opts & CYCLESKIPSHADED) != 0 && w->isShaded()); // skip if shaded |
1736 | } | 1736 | } |
1737 | 1737 | ||
1738 | //----------- useAutoGroupWindow ------------- | ||
1739 | // Access and clear the auto-group window | ||
1740 | //-------------------------------------------- | ||
1741 | FluxboxWindow* BScreen::useAutoGroupWindow() { | ||
1742 | Window w = auto_group_window; | ||
1743 | auto_group_window = 0; | ||
1744 | return w ? Fluxbox::instance()->searchWindow(w) : 0; | ||
1745 | } | ||
1746 | |||
1738 | #ifdef GNOME | 1747 | #ifdef GNOME |
1739 | void BScreen::initGnomeAtoms(void) { | 1748 | void BScreen::initGnomeAtoms() { |
1740 | 1749 | ||
1741 | /* create the GNOME window */ | 1750 | /* create the GNOME window */ |
1742 | gnome_win = XCreateSimpleWindow(getBaseDisplay()->getXDisplay(), | 1751 | gnome_win = XCreateSimpleWindow(getBaseDisplay()->getXDisplay(), |