lists.zerezo.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] randr change revert
- Date: Fri, 29 Aug 2008 12:04:17 +0800
- From: yinshuiboy <yinshuiboy@xxxxxxxxx>
- Subject: [PATCH] randr change revert
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
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 <<