aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-06-27 10:06:00 -0400
committerKen Moore <ken@ixsystems.com>2017-06-27 10:06:00 -0400
commit3285fabf539aa136c20fba6902d3927f684b901b (patch)
tree6bf8a3ca69872f71401abbcb43aa2564078fac7d /src-qt5
parentFix a bunch of the signals/slots connections. They should all be hooked up now. (diff)
downloadlumina-3285fabf539aa136c20fba6902d3927f684b901b.tar.gz
lumina-3285fabf539aa136c20fba6902d3927f684b901b.tar.bz2
lumina-3285fabf539aa136c20fba6902d3927f684b901b.zip
Add some more debugging.
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/libLumina/RootSubWindow.cpp30
-rw-r--r--src-qt5/core/libLumina/RootWindow.cpp3
2 files changed, 18 insertions, 15 deletions
diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp
index 41c04ee1..d00a3a75 100644
--- a/src-qt5/core/libLumina/RootSubWindow.cpp
+++ b/src-qt5/core/libLumina/RootSubWindow.cpp
@@ -41,34 +41,34 @@ RootSubWindow::ModState RootSubWindow::getStateAtPoint(QPoint pt, bool setoffset
//above the frame itself - need to figure out which quadrant it is in (8-directions)
if(pt.y() < WIN_BORDER){
//One of the top options
- if(pt.x() < WIN_BORDER){
+ if(pt.x() < WIN_BORDER){
if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()); } //difference from top-left corner
return ResizeTopLeft;
- }else if(pt.x() > (this->width()-WIN_BORDER)){
+ }else if(pt.x() > (this->width()-WIN_BORDER)){
if(setoffset){ offset.setX(this->width()-pt.x()); offset.setY(pt.y()); } //difference from top-right corner
return ResizeTopRight;
- }else{
+ }else{
if(setoffset){ offset.setX(0); offset.setY(pt.y()); } //difference from top edge (X does not matter)
- return ResizeTop;
- }
+ return ResizeTop;
+ }
}else if(pt.y() > (this->height()-WIN_BORDER) ){
//One of the bottom options
- if(pt.x() < WIN_BORDER){
+ if(pt.x() < WIN_BORDER){
if(setoffset){ offset.setX(pt.x()); offset.setY(this->height()-pt.y()); } //difference from bottom-left corner
return ResizeBottomLeft;
- }else if(pt.x() > (this->width()-WIN_BORDER)){
+ }else if(pt.x() > (this->width()-WIN_BORDER)){
if(setoffset){ offset.setX(this->width()-pt.x()); offset.setY(this->height()-pt.y()); } //difference from bottom-right corner
return ResizeBottomRight;
- }else{
+ }else{
if(setoffset){ offset.setX(0); offset.setY(this->height() - pt.y()); } //difference from bottom edge (X does not matter)
- return ResizeBottom;
- }
+ return ResizeBottom;
+ }
}else{
//One of the side options
- if(pt.x() < WIN_BORDER){
+ if(pt.x() < WIN_BORDER){
if(setoffset){ offset.setX(pt.x()); offset.setY(0); } //difference from left edge (Y does not matter)
return ResizeLeft;
- }else if(pt.x() > (this->width()-WIN_BORDER) ){
+ }else if(pt.x() > (this->width()-WIN_BORDER) ){
if(setoffset){ offset.setX(this->width()-pt.x()); offset.setY(0); } //difference from right edge (Y does not matter)
return ResizeRight;
}else{
@@ -112,7 +112,7 @@ void RootSubWindow::setMouseCursor(ModState state, bool override){
break;
case ResizeTopLeft:
shape = Qt::SizeFDiagCursor;
- break;
+ break;
}
if(override){
QApplication::setOverrideCursor(QCursor(shape));
@@ -123,6 +123,7 @@ void RootSubWindow::setMouseCursor(ModState state, bool override){
}
void RootSubWindow::initWindowFrame(){
+ qDebug() << "Create RootSubWindow Frame";
mainLayout = new QVBoxLayout(this);
titleBar = new QHBoxLayout(this);
closeB = new QToolButton(this);
@@ -139,7 +140,6 @@ void RootSubWindow::initWindowFrame(){
connect(maxB, SIGNAL(clicked()), this, SLOT(toggleMaximize()) );
connect(minB, SIGNAL(clicked()), this, SLOT(toggleMinimize()) );
//Now assemble the frame layout based on the current settings
- this->setLayout(mainLayout);
titleBar->addWidget(otherB);
titleBar->addWidget(titleLabel);
titleBar->addWidget(minB);
@@ -161,6 +161,8 @@ void RootSubWindow::initWindowFrame(){
mainLayout->setSpacing(0);
titleBar->setSpacing(1);
titleBar->setContentsMargins(0,0,0,0);
+ this->setLayout(mainLayout);
+ qDebug() << " - Done";
}
void RootSubWindow::LoadProperties( QList< NativeWindow::Property> list){
diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp
index 2586ccc2..f7b73eac 100644
--- a/src-qt5/core/libLumina/RootWindow.cpp
+++ b/src-qt5/core/libLumina/RootWindow.cpp
@@ -168,6 +168,7 @@ void RootWindow::ChangeWallpaper(QString id, RootWindow::ScaleType scale, QStrin
void RootWindow::NewWindow(NativeWindow *win){
RootSubWindow *subwin = 0;
+ qDebug() << "Got New Window:" << win->property(NativeWindow::Title);
for(int i=0; i<WINDOWS.length() && subwin==0; i++){
if(WINDOWS[i]->id() == win->id()){ subwin = WINDOWS[i]; }
}
@@ -176,7 +177,7 @@ void RootWindow::NewWindow(NativeWindow *win){
connect(win, SIGNAL(WindowClosed(WId)), this, SLOT(CloseWindow(WId)) );
WINDOWS << subwin;
}
- //subwin->show();
+ subwin->show();
}
void RootWindow::CloseWindow(WId win){
bgstack15