[rkward-cvs] SF.net SVN: rkward:[3976] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Oct 20 11:29:37 UTC 2011


Revision: 3976
          http://rkward.svn.sourceforge.net/rkward/?rev=3976&view=rev
Author:   tfry
Date:     2011-10-20 11:29:37 +0000 (Thu, 20 Oct 2011)
Log Message:
-----------
Fix bug while positioning detached tool windows on Windows.

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/windows/detachedwindowcontainer.cpp

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2011-10-20 09:37:56 UTC (rev 3975)
+++ trunk/rkward/ChangeLog	2011-10-20 11:29:37 UTC (rev 3976)
@@ -1,3 +1,4 @@
+- Fixed: On Windows, detached windows would sometimes be positioned with the menubar outside the upper screen edge
 - Add GUI support for inspecting the call stack during debugging
 - The backend executable is no longer linked against KDE libraries
 - Objects, which are not acceptable in a varslot, will still be shown, there, with a warning		TODO: add a UI to override

Modified: trunk/rkward/rkward/windows/detachedwindowcontainer.cpp
===================================================================
--- trunk/rkward/rkward/windows/detachedwindowcontainer.cpp	2011-10-20 09:37:56 UTC (rev 3975)
+++ trunk/rkward/rkward/windows/detachedwindowcontainer.cpp	2011-10-20 11:29:37 UTC (rev 3976)
@@ -64,6 +64,14 @@
 // NOTE: If the window has not been shown, before, its geometry() is always 640*480, unconditionally.
 	setGeometry (widget_to_capture->frameGeometry ());
 	if (!widget_to_capture->isWindow ()) move (widget_to_capture->mapToGlobal (widget_to_capture->pos ()));
+#ifdef Q_WS_WIN
+	// fix for detached tool windows positioned with the frame outside the screen
+	ensurePolished ();
+	QPoint adjust = pos ();
+	if (adjust.x () < 0) adjust.setX (0);
+	if (adjust.y () < 0) adjust.setY (0);
+	if (adjust != pos ()) move (adjust);
+#endif
 	widget_to_capture->setParent (this);
 	setCentralWidget (widget_to_capture);
 	widget_to_capture->show ();

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rkward-tracker mailing list