Drop compositing suspension dbus api
The main motivation behind this change is to encapsulate X11 compositor implementation to the point that it can be moved from libkwin to kwin_x11. There are two options: either get rid of suspend and resume requests, or add suspend and resume virtual functions in the Compositor. The apps must definitely not rely on the dbus api, they must use the X11 api. Compositing suspension api works only on X11 and it's quite obscure, it's not used by any other KDE component. So this patch goes for the most simplest option: dropping the requests.
This commit is contained in:
parent
b7f55534bc
commit
2a0d5f5e1d
6 changed files with 1 additions and 213 deletions
|
@ -19,13 +19,8 @@
|
|||
#include "x11window.h"
|
||||
|
||||
#include <KCrash>
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedString>
|
||||
#if KWIN_BUILD_NOTIFICATIONS
|
||||
#include <KNotification>
|
||||
#endif
|
||||
|
||||
#include <QAction>
|
||||
#include <QOpenGLContext>
|
||||
#include <QThread>
|
||||
|
||||
|
@ -98,21 +93,6 @@ void X11Compositor::suspend(X11Compositor::SuspendReason reason)
|
|||
{
|
||||
Q_ASSERT(reason != NoReasonSuspend);
|
||||
m_suspended |= reason;
|
||||
|
||||
if (reason & ScriptSuspend) {
|
||||
// When disabled show a shortcut how the user can get back compositing.
|
||||
const auto shortcuts = KGlobalAccel::self()->shortcut(workspace()->findChild<QAction *>(QStringLiteral("Suspend Compositing")));
|
||||
if (!shortcuts.isEmpty()) {
|
||||
// Display notification only if there is the shortcut.
|
||||
const QString message =
|
||||
i18n("Desktop effects have been suspended by another application.<br/>"
|
||||
"You can resume using the '%1' shortcut.",
|
||||
shortcuts.first().toString(QKeySequence::NativeText));
|
||||
#if KWIN_BUILD_NOTIFICATIONS
|
||||
KNotification::event(QStringLiteral("compositingsuspendeddbus"), message);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
stop();
|
||||
}
|
||||
|
||||
|
@ -136,9 +116,6 @@ void X11Compositor::start()
|
|||
if (m_suspended & BlockRuleSuspend) {
|
||||
reasons << QStringLiteral("Disabled by Window");
|
||||
}
|
||||
if (m_suspended & ScriptSuspend) {
|
||||
reasons << QStringLiteral("Disabled by Script");
|
||||
}
|
||||
qCInfo(KWIN_CORE) << "Compositing is suspended, reason:" << reasons;
|
||||
return;
|
||||
} else if (!compositingPossible()) {
|
||||
|
|
|
@ -26,7 +26,6 @@ public:
|
|||
NoReasonSuspend = 0,
|
||||
UserSuspend = 1 << 0,
|
||||
BlockRuleSuspend = 1 << 1,
|
||||
ScriptSuspend = 1 << 2,
|
||||
AllReasonSuspend = 0xff
|
||||
};
|
||||
Q_DECLARE_FLAGS(SuspendReasons, SuspendReason)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
// kwin
|
||||
#include "atoms.h"
|
||||
#include "compositor_x11.h"
|
||||
#include "compositor.h"
|
||||
#include "core/output.h"
|
||||
#include "core/renderbackend.h"
|
||||
#include "debug_console.h"
|
||||
|
@ -313,20 +313,6 @@ bool CompositorDBusInterface::platformRequiresCompositing() const
|
|||
return kwinApp()->operationMode() != Application::OperationModeX11; // TODO: Remove this property?
|
||||
}
|
||||
|
||||
void CompositorDBusInterface::resume()
|
||||
{
|
||||
if (kwinApp()->operationMode() == Application::OperationModeX11) {
|
||||
static_cast<X11Compositor *>(m_compositor)->resume(X11Compositor::ScriptSuspend);
|
||||
}
|
||||
}
|
||||
|
||||
void CompositorDBusInterface::suspend()
|
||||
{
|
||||
if (kwinApp()->operationMode() == Application::OperationModeX11) {
|
||||
static_cast<X11Compositor *>(m_compositor)->suspend(X11Compositor::ScriptSuspend);
|
||||
}
|
||||
}
|
||||
|
||||
void CompositorDBusInterface::reinitialize()
|
||||
{
|
||||
m_compositor->reinitialize();
|
||||
|
|
|
@ -162,37 +162,6 @@ public:
|
|||
bool platformRequiresCompositing() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
* @brief Suspends the Compositor if it is currently active.
|
||||
*
|
||||
* Note: it is possible that the Compositor is not able to suspend. Use isActive to check
|
||||
* whether the Compositor has been suspended.
|
||||
*
|
||||
* @return void
|
||||
* @see resume
|
||||
* @see isActive
|
||||
*/
|
||||
void suspend();
|
||||
|
||||
/**
|
||||
* @brief Resumes the Compositor if it is currently suspended.
|
||||
*
|
||||
* Note: it is possible that the Compositor cannot be resumed, that is there might be Clients
|
||||
* blocking the usage of Compositing or the Scene might be broken. Use isActive to check
|
||||
* whether the Compositor has been resumed. Also check isCompositingPossible and
|
||||
* isOpenGLBroken.
|
||||
*
|
||||
* Note: The starting of the Compositor can require some time and is partially done threaded.
|
||||
* After this method returns the setup may not have been completed.
|
||||
*
|
||||
* @return void
|
||||
* @see suspend
|
||||
* @see isActive
|
||||
* @see isCompositingPossible
|
||||
* @see isOpenGLBroken
|
||||
*/
|
||||
void resume();
|
||||
|
||||
/**
|
||||
* @brief Used by Compositing KCM after settings change.
|
||||
*
|
||||
|
|
|
@ -68,145 +68,6 @@ Comment[x-test]=xxKWin Window Managerxx
|
|||
Comment[zh_CN]=KWin 窗口管理器
|
||||
Comment[zh_TW]=KWin 視窗管理員
|
||||
|
||||
[Event/compositingsuspendeddbus]
|
||||
Name=Compositing has been suspended
|
||||
Name[ar]=عُلِّق التركيب
|
||||
Name[az]=Effektlər dayandırıldı
|
||||
Name[be]=Кампазітынг быў прыпынены
|
||||
Name[bg]=Ефектите са временно спрени
|
||||
Name[bs]=Slaganje je suspendovano
|
||||
Name[ca]=S'ha suspès la composició
|
||||
Name[ca@valencia]=S'ha suspés la composició
|
||||
Name[cs]=Kompozice byla pozastavena
|
||||
Name[da]=Compositing er blevet suspenderet
|
||||
Name[de]=Compositing ist ausgesetzt worden
|
||||
Name[el]=Η σύνθεση εικόνας τέθηκε σε αναστολή
|
||||
Name[en_GB]=Compositing has been suspended
|
||||
Name[eo]=Kunmetado prokrastiĝis
|
||||
Name[es]=Se ha suspendido la composición
|
||||
Name[et]=Komposiit on peatatud
|
||||
Name[eu]=Konposizioa eten egin da
|
||||
Name[fi]=Koostaminen on keskeytetty
|
||||
Name[fr]=La composition a été suspendue
|
||||
Name[fy]=Kompositing is ûnderbrútsen
|
||||
Name[ga]=Cuireadh comhshuí ar fionraí
|
||||
Name[gl]=Suspendeuse a composición
|
||||
Name[gu]=કોમ્પોઝિટીંગ બંધ કરવામાં આવ્યું છે
|
||||
Name[he]=השזירה הושהתה
|
||||
Name[hr]=Miješanje je pauzirano
|
||||
Name[hu]=A kompozit mód felfüggesztve
|
||||
Name[ia]=Composition ha essite suspendite
|
||||
Name[id]=Pengomposisian telah disuspensi
|
||||
Name[is]=Myndsmíði hefur verið hætt
|
||||
Name[it]=La composizione è stata sospesa
|
||||
Name[ja]=コンポジティングが一時停止されました
|
||||
Name[ka]=კომპოზიტურობა შეჩერდა
|
||||
Name[kk]=Құрастыру аялдатылды
|
||||
Name[km]=ការតែងត្រូវបានផ្អាក
|
||||
Name[kn]=ಮಿಶ್ರಗೊಳಿಕೆಯನ್ನು ತಡೆಹಿಡಿಯಲಾಗಿದೆ
|
||||
Name[ko]=컴포지팅 중지됨
|
||||
Name[lt]=Komponavimas pristabdytas
|
||||
Name[lv]=Kompozitēšana ir apturēta
|
||||
Name[mai]=कंपोजिटिंग निलंबित कएल गेल अछि
|
||||
Name[ml]=കോമ്പോസിറ്റിങ്ങ് താല്കാലികമായി നിര്ത്തിയിരിക്കുന്നു
|
||||
Name[mr]=कंपोझिटींग अकार्यक्षम करण्यात आले आहे
|
||||
Name[nb]=Sammensetting er blitt suspendert
|
||||
Name[nds]=Dat Tosamensetten wöör utmaakt
|
||||
Name[nl]=Compositing is uitgesteld
|
||||
Name[nn]=Samansetjinga er stoppa
|
||||
Name[pa]=ਕੰਪੋਜੀਟ ਕਰਨ ਨੂੰ ਨੂੰ ਸਸਪੈਂਡ ਕੀਤਾ ਗਿਆ
|
||||
Name[pl]=Wstrzymano kompozycje
|
||||
Name[pt]=A composição foi suspensa
|
||||
Name[pt_BR]=A composição foi suspensa
|
||||
Name[ro]=Compoziționarea a fost suspendată
|
||||
Name[ru]=Графические эффекты были отключены
|
||||
Name[si]=රචනය අත්හිටුවිය
|
||||
Name[sk]=Kompozícia bola pozastavená
|
||||
Name[sl]=Skladnja 3D je bila prestavljena v pripravljenost
|
||||
Name[sr]=Слагање је суспендовано
|
||||
Name[sr@ijekavian]=Слагање је суспендовано
|
||||
Name[sr@ijekavianlatin]=Slaganje je suspendovano
|
||||
Name[sr@latin]=Slaganje je suspendovano
|
||||
Name[sv]=Sammansättning har stoppats
|
||||
Name[ta]=Compositing முடக்கப்பட்டுள்ளது
|
||||
Name[th]=การทำคอมโพสิตถูกหยุดชั่วคราว
|
||||
Name[tr]=Bileşikleştirme askıya alındı
|
||||
Name[ug]=ئارىلاش مەشغۇلاتى توختىتىلدى
|
||||
Name[uk]=Композитний показ було тимчасово вимкнено
|
||||
Name[vi]=Việc kết hợp đã bị ngưng
|
||||
Name[wa]=Li môde compôzite a stî djoké
|
||||
Name[x-test]=xxCompositing has been suspendedxx
|
||||
Name[zh_CN]=显示特效合成已暂停
|
||||
Name[zh_TW]=合成器已被暫停
|
||||
Comment=Another application has requested to suspend compositing.
|
||||
Comment[ar]=تطبيق أخر طلب تعليق التركيب
|
||||
Comment[az]=Hansısa tətbiq qrafik effektləri söndürməyi tələb edti.
|
||||
Comment[be]=Іншая праграма запытала прыпыненне кампазітынгу.
|
||||
Comment[bg]=Друго приложение е поискало временно спиране на ефектите.
|
||||
Comment[bs]=Drugi program je zatražio da se slaganje suspenduje.
|
||||
Comment[ca]=Una altra aplicació ha sol·licitat de suspendre la composició.
|
||||
Comment[ca@valencia]=Una altra aplicació ha sol·licitat de suspendre la composició.
|
||||
Comment[cs]=Jiná aplikace si vyžádala pozastavení kompozice.
|
||||
Comment[da]=Et andet program har anmodet om suspendering af compositing.
|
||||
Comment[de]=Eine andere Anwendung hat das Aussetzen von Compositing erbeten.
|
||||
Comment[el]=Κάποια εφαρμογή αιτήθηκε την αναστολή της σύνθεσης εικόνας.
|
||||
Comment[en_GB]=Another application has requested to suspend compositing.
|
||||
Comment[eo]=Alia aplikaĵo petis ĉesigi komponadon.
|
||||
Comment[es]=Otra aplicación ha solicitado suspender la composición.
|
||||
Comment[et]=Mingi muu rakendus on nõudnud komposiidi peatamist.
|
||||
Comment[eu]=Beste aplikazio batek konposizioa eteteko eskatu du.
|
||||
Comment[fi]=Toinen sovellus vaati keskeyttämään koostamisen.
|
||||
Comment[fr]=Une autre application a demandé la suspension de la composition.
|
||||
Comment[fy]=In oare applikaasje hat frege om compositing út te stellen.
|
||||
Comment[ga]=Tá feidhmchlár eile ag iarraidh comhshuí a chur ar fionraí.
|
||||
Comment[gl]=Outra aplicación pediu que a suspensión da composición.
|
||||
Comment[he]=יישום אחר ביקש להשהות את השזירה.
|
||||
Comment[hr]=Neka aplikacija je dala zahtjev za paziranjem miješanja.
|
||||
Comment[hu]=Egy másik alkalmazás a kompozit mód felfüggesztését kérte.
|
||||
Comment[ia]=Altere application ha requirite de suspender le composition.
|
||||
Comment[id]=Aplikasi lain telah meminta untuk mensuspensi komposit.
|
||||
Comment[is]=Annað forrit hefur beðið um að myndsmíði verði hætt.
|
||||
Comment[it]=Un'altra applicazione ha richiesto di sospendere la composizione.
|
||||
Comment[ja]=他のアプリケーションがコンポジティングの一時停止を要求しました。
|
||||
Comment[ka]=კომპოზიტურობის შეჩერება სხვა აპლიკაციამ მოითხოვა.
|
||||
Comment[kk]=Басқа қолданбаның талабымен құрастыру аялдатылды.
|
||||
Comment[km]=កម្មវិធីផ្សេងបានស្នើឲ្យផ្អាកការតែង ។
|
||||
Comment[kn]=ಮಿಶ್ರಗೊಳಿಕೆಯನ್ನು ತಡೆಹಿಡಿಯುವಂತೆ ಬೇರೊಂದು ಅನ್ವಯವು ಮನವಿ ಸಲ್ಲಿಸಿದೆ.
|
||||
Comment[ko]=다른 앱이 컴포지팅을 꺼 달라고 요청했습니다.
|
||||
Comment[lt]=Kita programa paprašė pristabdyti komponavimą.
|
||||
Comment[lv]=Kāda programma pieprasīja apturēt kompozitēšanu.
|
||||
Comment[ml]=കമ്പോസിറ്റിംഗ് നിര്ത്തിവെയ്ക്കാന് വേറൊരു പ്രയോഗം ആവശ്യപ്പെട്ടിട്ടുണ്ട്
|
||||
Comment[mr]=कंपोझिटींग अकार्यक्षम करण्याची विनंती वेगळ्या अनुप्रयोगाने केलेली आहे.
|
||||
Comment[nb]=Et annet program har bedt om at sammensetting skal suspenderes.
|
||||
Comment[nds]=En anner Programm will dat Tosamensetten utsetten.
|
||||
Comment[nl]=Een andere applicatie heeft verzocht compositing uit te stellen.
|
||||
Comment[nn]=Eit anna program har spurt om stopping av samansetjinga.
|
||||
Comment[pa]=ਹੋਰ ਐਪਲੀਕੇਸ਼ਨ ਕੰਪੋਜੀਸ਼ਨ ਨੂੰ ਸਸਪੈਂਡ ਕਰਨ ਦੀ ਮੰਗ ਕਰ ਚੁੱਕੀ ਹੈ।
|
||||
Comment[pl]=Kolejny program zażądał wyłączenia kompozycji.
|
||||
Comment[pt]=Outra aplicação pediu para suspender a composição.
|
||||
Comment[pt_BR]=Outro aplicativo requisitou suspender a composição.
|
||||
Comment[ro]=Altă aplicație a cerut suspendarea compoziționării.
|
||||
Comment[ru]=Одно из приложений отключило графические эффекты
|
||||
Comment[si]=වෙනත් යෙදුමක් මගින් රචනය අත්හිටුවීමට ඉල්ලා ඇත.
|
||||
Comment[sk]=Iná aplikácia si vyžiadala pozastavenie kompozície.
|
||||
Comment[sl]=Drug program je zahteval prestavitev skladnje 3D v pripravljenost.
|
||||
Comment[sr]=Други програм је затражио да се слагање суспендује.
|
||||
Comment[sr@ijekavian]=Други програм је затражио да се слагање суспендује.
|
||||
Comment[sr@ijekavianlatin]=Drugi program je zatražio da se slaganje suspenduje.
|
||||
Comment[sr@latin]=Drugi program je zatražio da se slaganje suspenduje.
|
||||
Comment[sv]=Ett annat program har begärt att stoppa sammansättning.
|
||||
Comment[ta]=Compositing-ஐ முடக்குமாறு இன்னொரு செயலி கோரியுள்ளது.
|
||||
Comment[th]=โปรแกรมอื่นบางตัวได้ร้องขอทำการพักการทำงานของการทำคอมโพสิต
|
||||
Comment[tr]=Başka bir uygulama bileşikliğin askıya alınmasını istedi.
|
||||
Comment[ug]=باشقا بىر پروگرامما ئارىلاش مەشغۇلاتىنى توختىتىشنى تەلەپ قىلدى.
|
||||
Comment[uk]=Ще одна програма надіслала запит на вимикання композитного режиму.
|
||||
Comment[vi]=Một ứng dụng khác đã yêu cầu ngưng việc kết hợp.
|
||||
Comment[wa]=Èn ôte programe a dmandé d' djoker l' môde compôzite.
|
||||
Comment[x-test]=xxAnother application has requested to suspend compositing.xx
|
||||
Comment[zh_CN]=某个应用程序已要求暂停显示特效合成。
|
||||
Comment[zh_TW]=另一個應用程式已要求暫停合成。
|
||||
Action=Popup
|
||||
|
||||
[Event/graphicsreset]
|
||||
Name=Graphics Reset
|
||||
Name[ar]=إعادة ضبط الرسوميات
|
||||
|
|
|
@ -11,9 +11,5 @@
|
|||
<signal name="compositingToggled">
|
||||
<arg name="active" type="b" direction="out"/>
|
||||
</signal>
|
||||
<method name="suspend">
|
||||
</method>
|
||||
<method name="resume">
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
||||
|
|
Loading…
Reference in a new issue