--- Begin Message ---
Package: kscreensaver
Version: 4:3.2.3-2
Severity: minor
Tags: patch
The slideshow screensaver centers images, which splits them over
multiple monitors when using Xinerama. This makes it hard to enjoy the
images. Attached is a patch to make slideshow center the image on the
primary screen instead.
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (900, 'testing'), (500, 'unstable'), (300, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.7-1-686-smp
Locale: LANG=en_US, LC_CTYPE=en_US
Versions of packages kscreensaver depends on:
ii kdebase-bin 4:3.2.2-1 KDE Base (binaries)
ii kdelibs4 4:3.2.3-2 KDE core libraries
ii libart-2.0-2 2.3.16-6 Library of functions for 2D graphi
ii libc6 2.3.2.ds1-18 GNU C Library: Shared libraries an
ii libfam0c102 2.7.0-6 client library to control the FAM
ii libgcc1 1:3.4.2-2 GCC support library
ii libice6 4.3.0.dfsg.1-8 Inter-Client Exchange library
ii libpng12-0 1.2.7-1 PNG library - runtime
ii libqt3c102-mt 3:3.3.3-7 Qt GUI Library (Threaded runtime v
ii libsm6 4.3.0.dfsg.1-8 X Window System Session Management
ii libstdc++5 1:3.3.4-13 The GNU Standard C++ Library v3
ii libx11-6 4.3.0.dfsg.1-8 X Window System protocol client li
ii libxext6 4.3.0.dfsg.1-8 X Window System miscellaneous exte
ii libxrender1 0.8.3-7 X Rendering Extension client libra
ii libxt6 4.3.0.dfsg.1-8 X Toolkit Intrinsics
ii xlibmesa-gl [libgl1] 4.3.0.dfsg.1-8 Mesa 3D graphics library [XFree86]
ii xlibmesa-glu [libglu1] 4.3.0.dfsg.1-8 Mesa OpenGL utility library [XFree
ii xlibs 4.3.0.dfsg.1-8 X Window System client libraries m
ii zlib1g 1:1.2.2-3 compression library - runtime
-- no debconf information
*** slideshow.h.orig 2004-11-28 18:10:32.000000000 -0500
--- slideshow.h 2004-11-28 18:10:39.000000000 -0500
***************
*** 41,46 ****
--- 41,48 ----
protected:
void blank();
+ bool isSetup();
+
/** Load list of images from directory */
virtual void loadDirectory();
*** slideshow.cpp.orig 2004-11-28 17:25:56.000000000 -0500
--- slideshow.cpp 2004-11-28 18:49:59.000000000 -0500
***************
*** 20,25 ****
--- 20,26 ----
#include <qcombobox.h>
#include <qspinbox.h>
#include <qframe.h>
+ #include <qapplication.h>
#include <kconfig.h>
#include <kglobal.h>
***************
*** 174,185 ****
int x, y, i;
double alpha;
static QPointArray pa(4);
if (aInit)
{
startPainter();
! mw = width();
! mh = height();
mx = mw;
my = mh>>1;
pa.setPoint(0, mw>>1, mh>>1);
--- 175,196 ----
int x, y, i;
double alpha;
static QPointArray pa(4);
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
if (aInit)
{
startPainter();
! if( isSetup() )
! {
! mw = width();
! mh = height();
! }
! else
! {
! mw = scr.width();
! mh = scr.height();
! }
mx = mw;
my = mh>>1;
pa.setPoint(0, mw>>1, mh>>1);
***************
*** 221,231 ****
//----------------------------------------------------------------------------
int kSlideShowSaver::effectSpiralIn(bool aInit)
{
if (aInit)
{
startPainter();
! mw = width();
! mh = height();
mix = mw / 8;
miy = mh / 8;
mx0 = 0;
--- 232,253 ----
//----------------------------------------------------------------------------
int kSlideShowSaver::effectSpiralIn(bool aInit)
{
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
+
if (aInit)
{
startPainter();
! if( isSetup() )
! {
! mw = width();
! mh = height();
! }
! else
! {
! mw = scr.width();
! mh = scr.height();
! }
mix = mw / 8;
miy = mh / 8;
mx0 = 0;
***************
*** 291,302 ****
{
int i, x, y;
bool done;
if (aInit)
{
delete [] mIntArray;
! mw = width();
! mh = height();
mdx = 4;
mdy = 16;
mix = mw / mdx;
--- 313,334 ----
{
int i, x, y;
bool done;
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
if (aInit)
{
delete [] mIntArray;
! if( isSetup() )
! {
! mw = width();
! mh = height();
! }
! else
! {
! mw = scr.width();
! mh = scr.height();
! }
mdx = 4;
mdy = 16;
mix = mw / mdx;
***************
*** 333,344 ****
{
int x, y;
static QPointArray pa(4);
if (aInit)
{
startPainter();
! mw = width();
! mh = height();
mx = mw;
my = mh>>1;
mAlpha = 2*M_PI;
--- 365,386 ----
{
int x, y;
static QPointArray pa(4);
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
if (aInit)
{
startPainter();
! if( isSetup() )
! {
! mw = width();
! mh = height();
! }
! else
! {
! mw = scr.width();
! mh = scr.height();
! }
mx = mw;
my = mh>>1;
mAlpha = 2*M_PI;
***************
*** 374,387 ****
int kSlideShowSaver::effectSweep(bool aInit)
{
int w, h, x, y, i;
if (aInit)
{
// subtype: 0=sweep right to left, 1=sweep left to right
// 2=sweep bottom to top, 3=sweep top to bottom
mSubType = rand() % 4;
! mw = width();
! mh = height();
mdx = (mSubType==1 ? 16 : -16);
mdy = (mSubType==3 ? 16 : -16);
mx = (mSubType==1 ? 0 : mw);
--- 416,439 ----
int kSlideShowSaver::effectSweep(bool aInit)
{
int w, h, x, y, i;
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
if (aInit)
{
// subtype: 0=sweep right to left, 1=sweep left to right
// 2=sweep bottom to top, 3=sweep top to bottom
mSubType = rand() % 4;
! if( isSetup() )
! {
! mw = width();
! mh = height();
! }
! else
! {
! mw = scr.width();
! mh = scr.height();
! }
mdx = (mSubType==1 ? 16 : -16);
mdy = (mSubType==3 ? 16 : -16);
mx = (mSubType==1 ? 0 : mw);
***************
*** 425,437 ****
int kSlideShowSaver::effectBlobs(bool aInit)
{
int r;
if (aInit)
{
startPainter();
mAlpha = M_PI * 2;
! mw = width();
! mh = height();
mi = 150;
}
--- 477,499 ----
int kSlideShowSaver::effectBlobs(bool aInit)
{
int r;
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
if (aInit)
{
startPainter();
mAlpha = M_PI * 2;
! if( isSetup() )
! {
! mw = width();
! mh = height();
! }
! else
! {
! mw = scr.width();
! mh = scr.height();
! }
mi = 150;
}
***************
*** 457,467 ****
int kSlideShowSaver::effectRandom(bool /*aInit*/)
{
int x, y, i, w, h, fact, sz;
fact = (rand() % 3) + 1;
! w = width() >> fact;
! h = height() >> fact;
sz = 1 << fact;
for (i = (w*h)<<1; i > 0; i--)
--- 519,539 ----
int kSlideShowSaver::effectRandom(bool /*aInit*/)
{
int x, y, i, w, h, fact, sz;
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
fact = (rand() % 3) + 1;
! if( isSetup() )
! {
! w = scr.width() >> fact;
! h = scr.height() >> fact;
! }
! else
! {
! w = width() >> fact;
! h = height() >> fact;
! }
sz = 1 << fact;
for (i = (w*h)<<1; i > 0; i--)
***************
*** 479,488 ****
//----------------------------------------------------------------------------
int kSlideShowSaver::effectGrowing(bool aInit)
{
if (aInit)
{
! mw = width();
! mh = height();
mx = mw >> 1;
my = mh >> 1;
mi = 0;
--- 551,571 ----
//----------------------------------------------------------------------------
int kSlideShowSaver::effectGrowing(bool aInit)
{
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
+
if (aInit)
{
! if( isSetup() )
! {
! mw = width();
! mh = height();
! }
! else
! {
! mw = scr.width();
! mh = scr.height();
! }
mx = mw >> 1;
my = mh >> 1;
mi = 0;
***************
*** 511,521 ****
int kSlideShowSaver::effectChessboard(bool aInit)
{
int y;
if (aInit)
{
! mw = width();
! mh = height();
mdx = 8; // width of one tile
mdy = 8; // height of one tile
mj = (mw+mdx-1)/mdx; // number of tiles
--- 594,614 ----
int kSlideShowSaver::effectChessboard(bool aInit)
{
int y;
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
if (aInit)
{
! if( isSetup() )
! {
! mw = width();
! mh = height();
! }
! else
! {
! mw = scr.width();
! mh = scr.height();
! }
mdx = 8; // width of one tile
mdy = 8; // height of one tile
mj = (mw+mdx-1)/mdx; // number of tiles
***************
*** 553,563 ****
int kSlideShowSaver::effectIncomingEdges(bool aInit)
{
int x1, y1;
if (aInit)
{
! mw = width();
! mh = height();
mix = mw >> 1;
miy = mh >> 1;
mfx = mix / 100.0;
--- 646,666 ----
int kSlideShowSaver::effectIncomingEdges(bool aInit)
{
int x1, y1;
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
if (aInit)
{
! if( isSetup() )
! {
! mw = width();
! mh = height();
! }
! else
! {
! mw = scr.width();
! mh = scr.height();
! }
mix = mw >> 1;
miy = mh >> 1;
mfx = mix / 100.0;
***************
*** 604,614 ****
{
static int iyPos[] = { 0, 4, 2, 6, 1, 5, 3, 7, -1 };
int y;
if (aInit)
{
! mw = width();
! mh = height();
mi = 0;
}
--- 707,727 ----
{
static int iyPos[] = { 0, 4, 2, 6, 1, 5, 3, 7, -1 };
int y;
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
if (aInit)
{
! if( isSetup() )
! {
! mw = width();
! mh = height();
! }
! else
! {
! mw = scr.width();
! mh = scr.height();
! }
mi = 0;
}
***************
*** 630,640 ****
{
static int ixPos[] = { 0, 4, 2, 6, 1, 5, 3, 7, -1 };
int x;
if (aInit)
{
! mw = width();
! mh = height();
mi = 0;
}
--- 743,763 ----
{
static int ixPos[] = { 0, 4, 2, 6, 1, 5, 3, 7, -1 };
int x;
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
if (aInit)
{
! if( isSetup() )
! {
! mw = width();
! mh = height();
! }
! else
! {
! mw = scr.width();
! mh = scr.height();
! }
mi = 0;
}
***************
*** 718,731 ****
QPainter p;
int ww, wh, iw, ih, x, y;
double fx, fy;
if (mNextScreen.size() != size())
mNextScreen.resize(size());
mNextScreen.fill(black);
! ww = mNextScreen.width();
! wh = mNextScreen.height();
iw = mImage.width();
ih = mImage.height();
--- 841,864 ----
QPainter p;
int ww, wh, iw, ih, x, y;
double fx, fy;
+ QDesktopWidget *dsk = qApp->desktop();
+ QRect scr = dsk->screenGeometry(dsk->primaryScreen());
if (mNextScreen.size() != size())
mNextScreen.resize(size());
mNextScreen.fill(black);
! if( isSetup() )
! {
! ww = width();
! wh = height();
! }
! else
! {
! ww = scr.width();
! wh = scr.height();
! }
iw = mImage.width();
ih = mImage.height();
***************
*** 893,898 ****
--- 1026,1040 ----
//-----------------------------------------------------------------------------
+ bool kSlideShowSaver::isSetup()
+ {
+ QDesktopWidget *dsk = qApp->desktop();
+ QWidget *wid = dsk->screen(0);
+ QRect scr = wid->rect();
+ return !( width() == scr.width() && height() == scr.height() );
+ }
+
+ //-----------------------------------------------------------------------------
void kSlideShowSaver::blank()
{
erase();
--- End Message ---