Bug 68137 - Fullscreen centers image between screens
Summary: Fullscreen centers image between screens
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kuickshow
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Carsten Pfeiffer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-13 19:36 UTC by Daniel Bengtsson
Modified: 2015-02-06 12:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bengtsson 2003-11-13 19:36:43 UTC
Version:            (using KDE KDE 3.1.4)
Installed from:    RedHat RPMs
OS:          Linux

Using fullscreen mode in Kuickshow on my dual head setup centers the image in the middle of my two monitors thus only showing half the image on the screen I started kuickshow on. 

I am not using Xinerama, and my monitors use the same resolution.

Maximimizing a windowed image works correctly.
Comment 1 Daniel Bengtsson 2003-11-13 20:02:28 UTC
Let me correct the above. The image does not center itself exactly between the two monitors.

If you zoom out you can see that the image is centered at 1/4 of right screen (if I start kuickshow on the right) which makes a maximized image left side disappear on the left side of the right screen.

I use 1280x1024 and the image centers itself at exactly 320x512.
Comment 2 Carsten Pfeiffer 2004-01-11 00:57:54 UTC
Subject: kdegraphics/kuickshow/src

CVS commit by pfeiffer: 

change for multi-head setups (centering in fullscreen mode)
Can anyone with a multi-head setup please test if this makes sense
(in both xinerama and non-xinerama mode)? Thanks!

CCMAIL: 68137@bugs.kde.org


  M +24 -6     imagewindow.cpp   1.58


--- kdegraphics/kuickshow/src/imagewindow.cpp  #1.57:1.58
@@ -285,13 +285,31 @@ void ImageWindow::updateGeometry( int im
 void ImageWindow::centerImage()
 {
-    // Modified by Evan for his Multi-Head (2 screens)
-    // This should center on the first head
-    if ( myIsFullscreen && m_numHeads > 1 && ((m_numHeads % 2) == 0) )
-        xpos = ((width()/m_numHeads) / 2) - imageWidth()/2;
+    int w, h;
+    if ( myIsFullscreen )
+    {
+        QRect desktopRect = KGlobalSettings::desktopGeometry( this );
+        w = desktopRect.width();
+        h = desktopRect.height();
+    }
     else
-        xpos = width()/2 - imageWidth()/2;
+    {
+        w = width();
+        h = height();
+    }
+        
+    xpos = w/2 - imageWidth()/2;
+    ypos = h/2 - imageHeight()/2;
 
-    ypos = height()/2 - imageHeight()/2;
     XMoveWindow( x11Display(), win, xpos, ypos );
+    
+    // Modified by Evan for his Multi-Head (2 screens)
+    // This should center on the first head
+//     if ( myIsFullscreen && m_numHeads > 1 && ((m_numHeads % 2) == 0) )
+//         xpos = ((width()/m_numHeads) / 2) - imageWidth()/2;
+//     else
+//         xpos = width()/2 - imageWidth()/2;
+
+//     ypos = height()/2 - imageHeight()/2;
+//     XMoveWindow( x11Display(), win, xpos, ypos );
 }
 


Comment 3 Thomas Zander 2004-01-17 21:33:59 UTC
Works like a charm here on xinerama
Comment 4 Carsten Pfeiffer 2004-01-19 00:29:28 UTC
Subject: Re:  Fullscreen centers image between screens

On Sat, Jan 17, 2004 at 08:34:00PM -0000, zander@kde.org wrote:

Hi Thomas,

> Works like a charm here on xinerama

thank you very much for testing this!

Cheers
Carsten

Comment 5 Lubos Lunak 2004-07-27 10:52:03 UTC
This one is fixed if I understand this correctly.
Comment 6 Pavel Gurevich 2005-02-05 23:47:25 UTC
I'd like to add, that Xinerama users would appreciate if ALL operations will be possible to perform on a single screen. I have 2 monitors with different resolutions and images look pretty ugly when shown on both.
Comment 7 Rudolf Ernst 2005-11-20 22:59:35 UTC
Kuickshow 0.8.7 on 1280x1024 and 1600x1200 Xinerama looks indeed bad and behaves strange. one click: full screen on left display with ca 1/3 on the right,
double click: full screen with frame on the right display (fit in frame),
but next picture after scrolling mouse wheel has 1/3 on the left screen (maximized in height and so wider than the first one
Comment 8 Lincoln Peters 2006-06-18 07:36:58 UTC
Here's what I see, running Kuickshow 0.8.8 from Debian/testing on two monitors side-by-side (I have not tried building from source with the above patch; should I?):

* If the image is so wide that scaling it to the size of the current screen would leave empty space above and below the image, it spans across both screens.
* If the image is not so wide, it does not span, leaving the other screen blank and taking up as much space as possible on the current screen (possibly leaving blank space to the left and right of the image).

My guess as to the general nature of the bug:

If the image is of such dimensions that it could be displayed at a larger size by spanning multiple screens, it spans multiple screens.  Otherwise, it only uses the current screen.

Or am I experiencing a different bug altogether?
Comment 9 mail 2008-04-19 10:36:11 UTC
Maximizing on both xinerama screens is a problem when the screens do not have the same resolution. I have on the left a 15" in landscape orientation and to its right a 20" in portrait orientation. When viewing a picture maximized (default) the lower left quarter of the picture is missing, because there is only virtually a screen, but not in reality.
So, please only use the really available monitor size, not the virtual size of both monitors in xinerama.
Comment 10 Christoph Feck 2015-02-06 12:28:17 UTC
Thanks for your bug report or feature request.

The Kuickshow application is no longer maintained, and all open tickets are now closed.
See also http://websvn.kde.org/?view=revision&revision=1383834