[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: [PATCH] randr change revert
From: yinshuiboy <yinshuiboy () gmail ! com>
Date: 2008-08-29 4:04:17
Message-ID: 48B77541.7080100 () gmail ! com
[Download RAW message or body]
hi all,
this is a small problem of randr, when you change something in control
panel of randr, and then click 'revert to previous', nothing happens. so
i fix it,
the reason i think is that m_display->applyProposed apply all changes which
actually not happened.
this patch applies to kdebase/workspace/kcontrol/randr directory.
Greetings,
Siyuan Cao
["randr-change-revert.patch" (text/x-patch)]
Index: krandrmodule.cpp
===================================================================
--- krandrmodule.cpp (版本 854190)
+++ krandrmodule.cpp (工作副本)
@@ -39,6 +39,9 @@
: KCModule(KSSFactory::componentData(), parent)
{
m_display = new RandRDisplay();
+ if ( m_display->needsRefresh() )
+ m_display->refresh();
+
if (!m_display->isValid())
{
QVBoxLayout *topLayout = new QVBoxLayout(this);
Index: randrconfig.cpp
===================================================================
--- randrconfig.cpp (版本 854190)
+++ randrconfig.cpp (工作副本)
@@ -159,12 +159,22 @@
output->proposeRect(configuredRect);
output->proposeRotation(config->rotation());
output->proposeRefreshRate(config->refreshRate());
+
+ int change = 0;
+ if ( output->rect() != configuredRect )
+ change |= RandR::ChangeRect;
+ if ( output->rotation() != config->rotation() )
+ change |= RandR::ChangeRotation;
+ if ( output->refreshRate() != config->refreshRate() )
+ change |= RandR::ChangeRate;
+ output->applyProposed( RandR::ChangeRect, true );
+
} else { // user wants to disable this output
kDebug() << "Disabling " << output->name();
output->slotDisable();
}
}
- m_display->applyProposed();
+// m_display->applyProposed();
update();
}
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic