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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Sep 9 11:25:58 UTC 2010


Revision: 3007
          http://rkward.svn.sourceforge.net/rkward/?rev=3007&view=rev
Author:   tfry
Date:     2010-09-09 11:25:57 +0000 (Thu, 09 Sep 2010)

Log Message:
-----------
Make a better job at respecting specified graphics window sizes.

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

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2010-09-07 14:36:46 UTC (rev 3006)
+++ trunk/rkward/ChangeLog	2010-09-09 11:25:57 UTC (rev 3007)
@@ -1,10 +1,9 @@
-TODO: Do not use SmartInterface for KDE 4.5 and above
-
+- Fixed: Graphics windows used to assume a minimum size of 640*480 pixels, even if a smaller size was specified			/ TODO: check on Windows!
 - Add option to disable function argument hinting
 - New functions rk.show.message() and rk.show.question() for user interaction from R code
 - New options for scripting GUI logic in plugins		TODO: document, merge common functionality of common.js and rkcomponentscriptiong.js, error handling
 - The current object of an active data editor can be referenced in plugins		TODO: document
-- Fixed: Placement of several menu items was broken - again - with KDE 4.4 and above		TODO: check again, seems bad in 4.4.4
+- Fixed: Placement of several menu items was broken - again - with KDE 4.4 and above
 - Allow sorting of results in help search window
 - Fixed: CPU usage would go to 100% for no good reason under certain circumstances
 - The save-object selector in plugins now allows to save as part of a data.frame / list

Modified: trunk/rkward/rkward/windows/detachedwindowcontainer.cpp
===================================================================
--- trunk/rkward/rkward/windows/detachedwindowcontainer.cpp	2010-09-07 14:36:46 UTC (rev 3006)
+++ trunk/rkward/rkward/windows/detachedwindowcontainer.cpp	2010-09-09 11:25:57 UTC (rev 3007)
@@ -61,6 +61,7 @@
 	}
 
 // capture widget
+// 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 ()));
 	widget_to_capture->setParent (this);

Modified: trunk/rkward/rkward/windows/rkwindowcatcher.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkwindowcatcher.cpp	2010-09-07 14:36:46 UTC (rev 3006)
+++ trunk/rkward/rkward/windows/rkwindowcatcher.cpp	2010-09-09 11:25:57 UTC (rev 3007)
@@ -166,14 +166,15 @@
 				wininfo.rcClient.right - wininfo.rcWindow.right, wininfo.rcClient.bottom - wininfo.rcWindow.bottom);
 	// set a fixed size until the window is shown
 	xembed_container->setFixedSize (wininfo.rcClient.right - wininfo.rcClient.left, wininfo.rcClient.bottom - wininfo.rcClient.top);
-	move (wininfo.rcClient.left, wininfo.rcClient.top);
+	setGeometry (wininfo.rcClient.left, wininfo.rcClient.right, wininfo.rcClient.top, wininfo.rcClient.bottom);	// see comment in X11 section
+	move (wininfo.rcClient.left, wininfo.rcClient.top);		// else the window frame may be off scree on top/left.
 #elif defined Q_WS_X11
 	KWindowInfo wininfo = KWindowSystem::windowInfo (embedded, NET::WMName | NET::WMGeometry);
 	RK_ASSERT (wininfo.valid ());
 
 	// set a fixed size until the window is shown
 	xembed_container->setFixedSize (wininfo.geometry ().width (), wininfo.geometry ().height ());
-	move (wininfo.geometry ().topLeft());
+	setGeometry (wininfo.geometry ());	// it's important to set a size, even while not visible. Else DetachedWindowContainer will assign a default size of 640*480, and then size upwards, if necessary.
 	setCaption (wininfo.name ());
 #endif
 	dynamic_size = false;


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