diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-04-29 03:42:40 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-04-29 03:42:40 +0000 |
commit | ff4898fd413b863640a3b474ea0bb0c1b699f734 (patch) | |
tree | fffbdc7b613cd7dd3e618e1a52221b1b900953e6 /kcontrol/randr | |
parent | 71519fb37e5d0794a36e28d0c6efe1d197639ccb (diff) | |
download | tdebase-ff4898fd413b863640a3b474ea0bb0c1b699f734.tar.gz tdebase-ff4898fd413b863640a3b474ea0bb0c1b699f734.zip |
Revert accidental commit for these two files
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1120416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/randr')
-rw-r--r-- | kcontrol/randr/krandrtray.cpp | 19 | ||||
-rw-r--r-- | kcontrol/randr/krandrtray.h | 3 |
2 files changed, 6 insertions, 16 deletions
diff --git a/kcontrol/randr/krandrtray.cpp b/kcontrol/randr/krandrtray.cpp index 422aebba2..18d14bdc6 100644 --- a/kcontrol/randr/krandrtray.cpp +++ b/kcontrol/randr/krandrtray.cpp @@ -136,13 +136,14 @@ void KRandRSystemTray::contextMenuAboutToShow(KPopupMenu* menu) findPrimaryDisplay(); refresh(); -#ifndef QT_XRANDR_FIXES_01 // HACK - // This is needed because all unpatched versions of Qt does not properly generate screen + // This is needed because Qt does not properly generate screen // resize events when switching screens, so KDE gets stuck in the old resolution - currentScreen()->proposeSize(GetHackResolutionParameter()); - currentScreen()->applyProposed(); -#endif + // This only seems to happen with more than one screen, so check for that condition... + if (kapp->desktop()->numScreens() > 1) { + currentScreen()->proposeSize(GetHackResolutionParameter()); + currentScreen()->applyProposed(); + } currentScreen()->proposeSize(GetDefaultResolutionParameter()); currentScreen()->applyProposed(); @@ -256,9 +257,6 @@ int KRandRSystemTray::GetDefaultResolutionParameter() return returnIndex; } -#ifndef QT_XRANDR_FIXES_01 -#warning "Your version of Qt3 does not contain the XRandR screen switching patch. This will force a slow and suboptimal display switching method." -// HACK int KRandRSystemTray::GetHackResolutionParameter() { int resparm; @@ -267,7 +265,6 @@ int KRandRSystemTray::GetHackResolutionParameter() { return resparm; } -#endif void KRandRSystemTray::populateMenu(KPopupMenu* menu) { @@ -561,7 +558,6 @@ void KRandRSystemTray::slotCycleDisplays() findPrimaryDisplay(); refresh(); -#ifndef QT_XRANDR_FIXES_01 // HACK // This is needed because Qt does not properly generate screen // resize events when switching screens, so KDE gets stuck in the old resolution @@ -570,7 +566,6 @@ void KRandRSystemTray::slotCycleDisplays() currentScreen()->proposeSize(GetHackResolutionParameter()); currentScreen()->applyProposed(); } -#endif currentScreen()->proposeSize(GetDefaultResolutionParameter()); currentScreen()->applyProposed(); @@ -746,7 +741,6 @@ void KRandRSystemTray::slotOutputChanged(int parameter) findPrimaryDisplay(); refresh(); -#ifndef QT_XRANDR_FIXES_01 // HACK // This is needed because Qt does not properly generate screen // resize events when switching screens, so KDE gets stuck in the old resolution @@ -755,7 +749,6 @@ void KRandRSystemTray::slotOutputChanged(int parameter) currentScreen()->proposeSize(GetHackResolutionParameter()); currentScreen()->applyProposed(); } -#endif currentScreen()->proposeSize(GetDefaultResolutionParameter()); currentScreen()->applyProposed(); diff --git a/kcontrol/randr/krandrtray.h b/kcontrol/randr/krandrtray.h index 6a2892a2d..fac91e358 100644 --- a/kcontrol/randr/krandrtray.h +++ b/kcontrol/randr/krandrtray.h @@ -21,7 +21,6 @@ #include <qptrlist.h> -#include <qapplication.h> #include <ksystemtray.h> #include <kglobalaccel.h> @@ -63,9 +62,7 @@ private: void populateMenu(KPopupMenu* menu); void addOutputMenu(KPopupMenu* menu); int GetDefaultResolutionParameter(); -#ifndef QT_XRANDR_FIXES_01 int GetHackResolutionParameter(); -#endif void findPrimaryDisplay(); bool m_popupUp; |