[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bkde-baseapps=5D_konqueror/src=3A_Always_honor_the_c?=
From: Dawit Alemayehu <adawit () kde ! org>
Date: 2011-06-04 18:25:44
Message-ID: 20110604182544.CE23FA60A4 () git ! kde ! org
[Download RAW message or body]
Git commit 67625dcea346e1f54da49809d38e9db528ac7ef5 by Dawit Alemayehu.
Committed on 31/05/2011 at 08:14.
Pushed by adawit into branch 'master'.
Always honor the coordinate and size when creating a new window in
slotCreateNewWindow.
REVIEW: 101477
(cherry picked from commit 8ea273f60ef6b55609dd38383ea69e7558133d1d)
M +11 -17 konqueror/src/konqmainwindow.cpp
http://commits.kde.org/kde-baseapps/67625dcea346e1f54da49809d38e9db528ac7ef5
diff --git a/konqueror/src/konqmainwindow.cpp b/konqueror/src/konqmainwindow.cpp
index 017bab5..a309f48 100644
--- a/konqueror/src/konqmainwindow.cpp
+++ b/konqueror/src/konqmainwindow.cpp
@@ -1272,27 +1272,21 @@ void KonqMainWindow::slotCreateNewWindow( const KUrl &url,
mainWindow->viewManager()->setActivePart(*part);
}
- if ( windowArgs.x() != -1 )
- mainWindow->move( windowArgs.x(), mainWindow->y() );
- if ( windowArgs.y() != -1 )
- mainWindow->move( mainWindow->x(), windowArgs.y() );
-
- int width;
- if ( windowArgs.width() != -1 )
- width = windowArgs.width();
- else
- width = mainWindow->width();
+#ifdef Q_WS_X11
+ // WORKAROUND: Clear the window state information set by KMainWindow::restoreWindowSize
+ // so that the size and location settings we set below always take effect.
+ KWindowSystem::clearState(mainWindow->winId(), NET::Max);
+#endif
- int height;
- if ( windowArgs.height() != -1 )
- height = windowArgs.height();
- else
- height = mainWindow->height();
+ // process the window args
+ const int xPos = ((windowArgs.x() == -1) ? mainWindow->x() : windowArgs.x());
+ const int yPos = ((windowArgs.y() == -1) ? mainWindow->y() : windowArgs.y());
+ const int width = ((windowArgs.width() == -1) ? mainWindow->width() : windowArgs.width());
+ const int height = ((windowArgs.height() == -1) ? mainWindow->height() : windowArgs.height());
+ mainWindow->move ( xPos, yPos );
mainWindow->resize( width, height );
- // process the window args
-
if ( !windowArgs.isMenuBarVisible() )
{
mainWindow->menuBar()->hide();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic