summaryrefslogtreecommitdiffstats
path: root/mandriva/2010.2/applications/krandr/krandr-0.5.2.1-legacy_randr_on_single_output.patch
diff options
context:
space:
mode:
authorTim Williams <tmw@autotrain.org>2011-10-17 18:47:27 +0100
committerTim Williams <tmw@autotrain.org>2011-10-17 18:47:27 +0100
commit76ef832ce5348d12a871223d4c034c7daeaddb82 (patch)
tree7024a1f39a6114daa8c5ed24bb31a8687c832b9a /mandriva/2010.2/applications/krandr/krandr-0.5.2.1-legacy_randr_on_single_output.patch
parentec2515f058c60d2478a549f58376db628ba556b9 (diff)
downloadtde-packaging-76ef832ce5348d12a871223d4c034c7daeaddb82.tar.gz
tde-packaging-76ef832ce5348d12a871223d4c034c7daeaddb82.zip
Adding the remaining Mandriva patches and spec files
Diffstat (limited to 'mandriva/2010.2/applications/krandr/krandr-0.5.2.1-legacy_randr_on_single_output.patch')
-rw-r--r--mandriva/2010.2/applications/krandr/krandr-0.5.2.1-legacy_randr_on_single_output.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/mandriva/2010.2/applications/krandr/krandr-0.5.2.1-legacy_randr_on_single_output.patch b/mandriva/2010.2/applications/krandr/krandr-0.5.2.1-legacy_randr_on_single_output.patch
new file mode 100644
index 000000000..8b406daa5
--- /dev/null
+++ b/mandriva/2010.2/applications/krandr/krandr-0.5.2.1-legacy_randr_on_single_output.patch
@@ -0,0 +1,30 @@
+--- krandr-0.5.2.1/randr/randrdisplay.cpp.orig 2007-09-12 11:00:50.000000000 -0300
++++ krandr-0.5.2.1/randr/randrdisplay.cpp 2007-09-12 11:05:15.000000000 -0300
+@@ -64,6 +64,27 @@ RandRDisplay::RandRDisplay()
+ m_legacyScreens.append(new LegacyRandRScreen(i));
+ }
+
++#ifdef HAS_RANDR_1_2
++ // check if we have more than one output, if no, revert to the legacy behavior
++ if (RandR::has_1_2)
++ {
++ int count = 0;
++ for (int i = 0; i < m_numScreens; ++i)
++ count += m_screens[i]->outputs().count();
++
++ if (count < 2)
++ {
++ RandR::has_1_2 = false;
++ for (int i = 0; i < m_numScreens; ++i)
++ {
++ delete m_screens[i];
++ m_legacyScreens.append(new LegacyRandRScreen(i));
++ }
++ m_screens.clear();
++ }
++ }
++#endif
++
+ setCurrentScreen(QApplication::desktop()->primaryScreen());
+ }
+