aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-05-19 14:26:30 (GMT)
committerrathnor <rathnor>2003-05-19 14:26:30 (GMT)
commitcc9c7960c1c5413002c3a6c456650e59ee1ff501 (patch)
treedb11494b3cbd61619229328b722f2c47c6b0a916 /src/Toolbar.cc
parent68e9677bbb9ebe8f7c1a5edea25f236c09ed3460 (diff)
downloadfluxbox-cc9c7960c1c5413002c3a6c456650e59ee1ff501.zip
fluxbox-cc9c7960c1c5413002c3a6c456650e59ee1ff501.tar.bz2
add back some xinerama support (toolbar, slit (+menu), screen)
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc35
1 files changed, 31 insertions, 4 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 2508ec9..9a29f79 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.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: Toolbar.cc,v 1.84 2003/05/17 11:30:59 fluxgen Exp $ 25// $Id: Toolbar.cc,v 1.85 2003/05/19 14:26:30 rathnor Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -43,6 +43,10 @@
43#include "BoolMenuItem.hh" 43#include "BoolMenuItem.hh"
44#include "FbWinFrameTheme.hh" 44#include "FbWinFrameTheme.hh"
45 45
46#ifdef XINERAMA
47#include "Xinerama.hh"
48#endif XINERAMA
49
46// use GNU extensions 50// use GNU extensions
47#ifndef _GNU_SOURCE 51#ifndef _GNU_SOURCE
48#define _GNU_SOURCE 52#define _GNU_SOURCE
@@ -134,6 +138,18 @@ void setupMenus(Toolbar &tbar) {
134 menu.setInternalMenu(); 138 menu.setInternalMenu();
135 139
136 menu.insert("Layer...", &tbar.layermenu()); 140 menu.insert("Layer...", &tbar.layermenu());
141#ifdef XINERAMA
142 if (tbar.screen().hasXinerama()) {
143 menu.insert("On Head...", new XineramaHeadMenu<Toolbar>(
144 *tbar.screen().menuTheme(),
145 tbar.screen(),
146 tbar.screen().imageControl(),
147 *tbar.screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()),
148 &tbar
149 ));
150 }
151
152#endif //XINERAMA
137 153
138 // setup items in placement menu 154 // setup items in placement menu
139 struct { 155 struct {
@@ -1091,10 +1107,21 @@ void Toolbar::setPlacement(Toolbar::Placement where) {
1091 head_w, 1107 head_w,
1092 head_h; 1108 head_h;
1093 1109
1094 m_place = where; 1110#ifdef XINERAMA
1111 if (screen().hasXinerama()) {
1112 int head = screen().getToolbarOnHead();
1113 head_x = screen().getHeadX(head);
1114 head_y = screen().getHeadY(head);
1115 head_w = screen().getHeadWidth(head);
1116 head_h = screen().getHeadHeight(head);
1117 } else
1118#endif // XINERAMA
1119 {
1120 head_w = screen().width();
1121 head_h = screen().height();
1122 }
1095 1123
1096 head_w = screen().width(); 1124 m_place = where;
1097 head_h = screen().height();
1098 1125
1099 frame.width = head_w * screen().getToolbarWidthPercent() / 100; 1126 frame.width = head_w * screen().getToolbarWidthPercent() / 100;
1100 frame.height = m_theme.font().height(); 1127 frame.height = m_theme.font().height();