summaryrefslogtreecommitdiff
path: root/core/launcher/desktop.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/desktop.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp31
1 files changed, 24 insertions, 7 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 86527f6..6def126 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -509,3 +509,3 @@ Desktop::Desktop() :
setGeometry( 0, displayh - sz.height(), displayw, sz.height() );
- tb->setGeometry( 0, displayh - sz.height(), displayw, sz.height() );
+ layout();
@@ -526,2 +526,3 @@ Desktop::Desktop() :
qApp->installEventFilter( this );
+ qApp->desktop()->installEventFilter( this );
@@ -734,8 +735,3 @@ void Desktop::styleChange( QStyle &s )
QWidget::styleChange( s );
- int displayw = qApp->desktop() ->width();
- int displayh = qApp->desktop() ->height();
-
- QSize sz = tb->sizeHint();
-
- tb->setGeometry( 0, displayh - sz.height(), displayw, sz.height() );
+ layout();
}
@@ -808,2 +804,13 @@ void DesktopApplication::restart()
+void Desktop::layout()
+{
+ int displayw = qApp->desktop() ->width();
+ int displayh = qApp->desktop() ->height();
+
+ QSize sz = tb->sizeHint();
+
+ tb->setGeometry( 0, displayh - sz.height(), displayw, sz.height() );
+ tb->calcMaxWindowRect();
+}
+
void Desktop::startTransferServer()
@@ -832,2 +839,12 @@ void Desktop::timerEvent( QTimerEvent *e )
+bool Desktop::eventFilter( QObject *o, QEvent *ev )
+{
+ if ( o != qApp->desktop() || ev->type() != QEvent::Resize )
+ return QWidget::eventFilter( o, ev );
+
+ layout();
+
+ return QWidget::eventFilter( o, ev );
+}
+
void Desktop::terminateServers()