aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/LPanel.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-07-28 14:21:48 -0400
committerKen Moore <moorekou@gmail.com>2015-07-28 14:21:48 -0400
commit33b2e0ec1c3810ccfac177e311fea2b03db8e47c (patch)
tree013ac6fdd53507cd97b9f7dc8698a6fdc5154bfa /lumina-desktop/LPanel.cpp
parentJust a minor update to some debugging (when turned on) for checking icons wit... (diff)
downloadlumina-33b2e0ec1c3810ccfac177e311fea2b03db8e47c.tar.gz
lumina-33b2e0ec1c3810ccfac177e311fea2b03db8e47c.tar.bz2
lumina-33b2e0ec1c3810ccfac177e311fea2b03db8e47c.zip
Add some work that make the Lumina desktop/panels appear in the proper locations when XINERAMA is used for combining monitors. However, the interface is still completely unresponsive because the Qt backend is completely screwed up by Xinerama (returns 0's for everything related to screens, geometries, etc, preventing menus from opening up even when manually started). This might be something where we just have to say that Xinerama is not supported for Lumina (at least until lumina-wm get finished up).
Diffstat (limited to 'lumina-desktop/LPanel.cpp')
-rw-r--r--lumina-desktop/LPanel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp
index 94db8ce0..7767d004 100644
--- a/lumina-desktop/LPanel.cpp
+++ b/lumina-desktop/LPanel.cpp
@@ -27,7 +27,7 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){
panelnum = num; //save for later
screen = LSession::desktop();
PPREFIX = "panel"+QString::number(screennum)+"."+QString::number(num)+"/";
- defaultpanel = (screen->screenGeometry(screennum).x()==0 && num==0);
+ defaultpanel = (LSession::handle()->screenGeom(screennum).x()==0 && num==0);
horizontal=true; //use this by default initially
hidden = false; //use this by default
//Setup the panel
@@ -115,9 +115,9 @@ void LPanel::UpdatePanel(){
else{ viswidth = ht; }
if(DEBUG){ qDebug() << "Hidden Panel size:" << hidesize << "pixels"; }
//qDebug() << " - set Geometry";
- int xwid = screen->screenGeometry(screennum).width();
- int xhi = screen->screenGeometry(screennum).height();
- int xloc = screen->screenGeometry(screennum).x();
+ int xwid = LSession::handle()->screenGeom(screennum).width();
+ int xhi = LSession::handle()->screenGeom(screennum).height();
+ int xloc = LSession::handle()->screenGeom(screennum).x();
double panelPercent = settings->value(PPREFIX+"lengthPercent",100).toInt();
if(panelPercent<1 || panelPercent>100){ panelPercent = 100; }
panelPercent = panelPercent/100.0;
@@ -303,7 +303,7 @@ void LPanel::paintEvent(QPaintEvent *event){
if(hidden && (this->pos()==hidepoint) ){ rec.moveTo( this->mapToGlobal(rec.topLeft()-hidepoint+showpoint) ); }
else{ rec.moveTo( this->mapToGlobal(rec.topLeft()) ); }
//qDebug() << "Global Rec:" << rec.x() << rec.y() << screennum;
- rec.moveTo( rec.x()-screen->screenGeometry(screennum).x(), rec.y() );
+ rec.moveTo( rec.x()-LSession::handle()->screenGeom(screennum).x(), rec.y() );
//qDebug() << "Adjusted Global Rec:" << rec.x() << rec.y();
painter->drawPixmap(event->rect(), bgWindow->grab(rec) );
QWidget::paintEvent(event); //now pass the event along to the normal painting event
bgstack15