diff options
author | fluxgen <fluxgen> | 2002-03-19 14:30:43 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-03-19 14:30:43 (GMT) |
commit | 95aeda26271cce3061a46a3ca0b122bc13c8f5c8 (patch) | |
tree | aaa01d20e77a2445a20a0522d86296b981049b8e /src/Screen.cc | |
parent | 1871169b06d8b9909ff26b761d24a40a65ef18f9 (diff) | |
download | fluxbox-95aeda26271cce3061a46a3ca0b122bc13c8f5c8.zip fluxbox-95aeda26271cce3061a46a3ca0b122bc13c8f5c8.tar.bz2 |
Xinerama support
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 7209cdc..3c7f4a9 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.36 2002/03/19 00:05:49 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.37 2002/03/19 14:30:42 fluxgen Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -215,6 +215,9 @@ tab_width(rm, 64, scrname+".tab.width", altscrname+".Tab.Width"), | |||
215 | tab_height(rm, 16, scrname+".tab.height", altscrname+".Tab.Height"), | 215 | tab_height(rm, 16, scrname+".tab.height", altscrname+".Tab.Height"), |
216 | tab_placement(rm, Tab::PTOP, scrname+".tab.placement", altscrname+".Tab.Placement"), | 216 | tab_placement(rm, Tab::PTOP, scrname+".tab.placement", altscrname+".Tab.Placement"), |
217 | tab_alignment(rm, Tab::ALEFT, scrname+".tab.alignment", altscrname+".Tab.Alignment"), | 217 | tab_alignment(rm, Tab::ALEFT, scrname+".tab.alignment", altscrname+".Tab.Alignment"), |
218 | #ifdef XINERAMA | ||
219 | toolbar_on_head(rm, 0, scrname+".toolbar.onhead", altscrname+".Toolbar.onHead"), | ||
220 | #endif // XINERAMA | ||
218 | toolbar_placement(rm, Toolbar::BOTTOMCENTER, scrname+".toolbar.placement", altscrname+".Toolbar.Placement") | 221 | toolbar_placement(rm, Toolbar::BOTTOMCENTER, scrname+".toolbar.placement", altscrname+".Toolbar.Placement") |
219 | { | 222 | { |
220 | 223 | ||
@@ -1025,11 +1028,21 @@ void BScreen::raiseWindows(Window *workspace_stack, int num) { | |||
1025 | #ifdef SLIT | 1028 | #ifdef SLIT |
1026 | session_stack[i++] = slit->getMenu().getDirectionmenu()->getWindowID(); | 1029 | session_stack[i++] = slit->getMenu().getDirectionmenu()->getWindowID(); |
1027 | session_stack[i++] = slit->getMenu().getPlacementmenu()->getWindowID(); | 1030 | session_stack[i++] = slit->getMenu().getPlacementmenu()->getWindowID(); |
1031 | #ifdef XINERAMA | ||
1032 | if (hasXinerama()) { | ||
1033 | session_stack[i++] = slit->getMenu().getHeadmenu()->getWindowID(); | ||
1034 | } | ||
1035 | #endif // XINERAMA | ||
1028 | session_stack[i++] = slit->getMenu().getWindowID(); | 1036 | session_stack[i++] = slit->getMenu().getWindowID(); |
1029 | #endif // SLIT | 1037 | #endif // SLIT |
1030 | 1038 | ||
1031 | session_stack[i++] = | 1039 | session_stack[i++] = |
1032 | toolbar->getMenu()->getPlacementmenu()->getWindowID(); | 1040 | toolbar->getMenu()->getPlacementmenu()->getWindowID(); |
1041 | #ifdef XINERAMA | ||
1042 | if (hasXinerama()) { | ||
1043 | session_stack[i++] = toolbar->getMenu()->getHeadmenu()->getWindowID(); | ||
1044 | } | ||
1045 | #endif // XINERAMA | ||
1033 | session_stack[i++] = toolbar->getMenu()->getWindowID(); | 1046 | session_stack[i++] = toolbar->getMenu()->getWindowID(); |
1034 | 1047 | ||
1035 | Rootmenus::iterator rit = rootmenuList.begin(); | 1048 | Rootmenus::iterator rit = rootmenuList.begin(); |
@@ -1667,9 +1680,18 @@ void BScreen::shutdown(void) { | |||
1667 | 1680 | ||
1668 | void BScreen::showPosition(int x, int y) { | 1681 | void BScreen::showPosition(int x, int y) { |
1669 | if (! geom_visible) { | 1682 | if (! geom_visible) { |
1683 | #ifdef XINERAMA | ||
1684 | unsigned int head = hasXinerama() ? getCurrHead() : 0; | ||
1685 | |||
1686 | XMoveResizeWindow(getBaseDisplay()->getXDisplay(), geom_window, | ||
1687 | getHeadX(head) + (getHeadWidth(head) - geom_w) / 2, | ||
1688 | getHeadY(head) + (getHeadHeight(head) - geom_h) / 2, geom_w, geom_h); | ||
1689 | #else // !XINERMA | ||
1670 | XMoveResizeWindow(getBaseDisplay()->getXDisplay(), geom_window, | 1690 | XMoveResizeWindow(getBaseDisplay()->getXDisplay(), geom_window, |
1671 | (getWidth() - geom_w) / 2, | 1691 | (getWidth() - geom_w) / 2, |
1672 | (getHeight() - geom_h) / 2, geom_w, geom_h); | 1692 | (getHeight() - geom_h) / 2, geom_w, geom_h); |
1693 | #endif // XINERAMA | ||
1694 | |||
1673 | XMapWindow(getBaseDisplay()->getXDisplay(), geom_window); | 1695 | XMapWindow(getBaseDisplay()->getXDisplay(), geom_window); |
1674 | XRaiseWindow(getBaseDisplay()->getXDisplay(), geom_window); | 1696 | XRaiseWindow(getBaseDisplay()->getXDisplay(), geom_window); |
1675 | 1697 | ||
@@ -1707,9 +1729,17 @@ void BScreen::showPosition(int x, int y) { | |||
1707 | 1729 | ||
1708 | void BScreen::showGeometry(unsigned int gx, unsigned int gy) { | 1730 | void BScreen::showGeometry(unsigned int gx, unsigned int gy) { |
1709 | if (! geom_visible) { | 1731 | if (! geom_visible) { |
1732 | #ifdef XINERAMA | ||
1733 | unsigned int head = hasXinerama() ? getCurrHead() : 0; | ||
1734 | |||
1735 | XMoveResizeWindow(getBaseDisplay()->getXDisplay(), geom_window, | ||
1736 | getHeadX(head) + (getHeadWidth(head) - geom_w) / 2, | ||
1737 | getHeadY(head) + (getHeadHeight(head) - geom_h) / 2, geom_w, geom_h); | ||
1738 | #else // !XINERMA | ||
1710 | XMoveResizeWindow(getBaseDisplay()->getXDisplay(), geom_window, | 1739 | XMoveResizeWindow(getBaseDisplay()->getXDisplay(), geom_window, |
1711 | (getWidth() - geom_w) / 2, | 1740 | (getWidth() - geom_w) / 2, |
1712 | (getHeight() - geom_h) / 2, geom_w, geom_h); | 1741 | (getHeight() - geom_h) / 2, geom_w, geom_h); |
1742 | #endif // XINERAMA | ||
1713 | XMapWindow(getBaseDisplay()->getXDisplay(), geom_window); | 1743 | XMapWindow(getBaseDisplay()->getXDisplay(), geom_window); |
1714 | XRaiseWindow(getBaseDisplay()->getXDisplay(), geom_window); | 1744 | XRaiseWindow(getBaseDisplay()->getXDisplay(), geom_window); |
1715 | 1745 | ||