aboutsummaryrefslogtreecommitdiff
path: root/src/Slit.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/Slit.cc
parent68e9677bbb9ebe8f7c1a5edea25f236c09ed3460 (diff)
downloadfluxbox_pavel-cc9c7960c1c5413002c3a6c456650e59ee1ff501.zip
fluxbox_pavel-cc9c7960c1c5413002c3a6c456650e59ee1ff501.tar.bz2
add back some xinerama support (toolbar, slit (+menu), screen)
Diffstat (limited to 'src/Slit.cc')
-rw-r--r--src/Slit.cc34
1 files changed, 31 insertions, 3 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index 6f1a7c4..b2dd383 100644
--- a/src/Slit.cc
+++ b/src/Slit.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: Slit.cc,v 1.55 2003/05/17 11:00:50 fluxgen Exp $ 25// $Id: Slit.cc,v 1.56 2003/05/19 14:26:30 rathnor Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -52,6 +52,10 @@
52#include "Transparent.hh" 52#include "Transparent.hh"
53#include "IntResMenuItem.hh" 53#include "IntResMenuItem.hh"
54 54
55#ifdef XINERAMA
56#include "Xinerama.hh"
57#endif // XINERAMA
58
55#include <algorithm> 59#include <algorithm>
56#include <iostream> 60#include <iostream>
57#include <cassert> 61#include <cassert>
@@ -790,8 +794,20 @@ void Slit::reposition() {
790 head_w, 794 head_w,
791 head_h; 795 head_h;
792 796
793 head_w = screen().width(); 797#ifdef XINERAMA
794 head_h = screen().height(); 798 if (screen().hasXinerama()) {
799 int head = screen().getSlitOnHead();
800 head_x = screen().getHeadX(head);
801 head_y = screen().getHeadY(head);
802 head_w = screen().getHeadWidth(head);
803 head_h = screen().getHeadHeight(head);
804 } else
805#endif // XINERAMA
806 {
807 head_w = screen().width();
808 head_h = screen().height();
809 }
810
795 int border_width = screen().rootTheme().borderWidth(); 811 int border_width = screen().rootTheme().borderWidth();
796 int bevel_width = screen().rootTheme().bevelWidth(); 812 int bevel_width = screen().rootTheme().bevelWidth();
797 813
@@ -1206,6 +1222,18 @@ void Slit::setupMenu() {
1206 1222
1207 m_slitmenu.insert("Layer...", m_layermenu.get()); 1223 m_slitmenu.insert("Layer...", m_layermenu.get());
1208 1224
1225#ifdef XINERAMA
1226 if (screen().hasXinerama()) {
1227 m_slitmenu.insert("On Head...", new XineramaHeadMenu<Slit>(
1228 *screen().menuTheme(),
1229 screen(),
1230 screen().imageControl(),
1231 *screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()),
1232 this
1233 ));
1234 }
1235
1236#endif //XINERAMA
1209 m_slitmenu.insert(new BoolMenuItem(i18n->getMessage( 1237 m_slitmenu.insert(new BoolMenuItem(i18n->getMessage(
1210 CommonSet, CommonAutoHide, 1238 CommonSet, CommonAutoHide,
1211 "Auto hide"), 1239 "Auto hide"),