Summary: | Fullscreen centers image between screens | ||
---|---|---|---|
Product: | [Applications] kuickshow | Reporter: | Daniel Bengtsson <danielb> |
Component: | general | Assignee: | Carsten Pfeiffer <pfeiffer> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | cfeck, l.lunak |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | RedHat Enterprise Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Daniel Bengtsson
2003-11-13 19:36:43 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. 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 ); } Works like a charm here on xinerama 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 This one is fixed if I understand this correctly. 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. 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 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? 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. 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 |