Add isInputMethod in EffectWindow and do not dim input method window

This commit is contained in:
Weng Xuetian 2023-11-13 16:03:07 -08:00
parent aabc162632
commit 9e047059c1
No known key found for this signature in database
GPG key ID: 8E8B898CBF2412F9
4 changed files with 13 additions and 1 deletions

View file

@ -955,6 +955,7 @@ WINDOW_HELPER(bool, isSkipSwitcher, skipSwitcher)
WINDOW_HELPER(bool, decorationHasAlpha, decorationHasAlpha)
WINDOW_HELPER(bool, isUnresponsive, unresponsive)
WINDOW_HELPER(QList<VirtualDesktop *>, desktops, desktops)
WINDOW_HELPER(bool, isInputMethod, isInputMethod)
#undef WINDOW_HELPER

View file

@ -2302,6 +2302,11 @@ public:
*/
QUuid internalId() const;
/**
* @since 6.0
*/
bool isInputMethod() const;
/**
* Can be used to by effects to store arbitrary data in the EffectWindow.
*

View file

@ -187,7 +187,7 @@ bool DimInactiveEffect::canDimWindow(const EffectWindow *w) const
return false;
}
if (w->isPopupWindow()) {
if (w->isPopupWindow() || w->isInputMethod()) {
return false;
}

View file

@ -533,6 +533,12 @@ class KWIN_EXPORT Window : public QObject
*/
Q_PROPERTY(KWin::Tile *tile READ tile WRITE setTile NOTIFY tileChanged)
/**
* Returns whether this window is a input method window.
* This is only used for Wayland.
*/
Q_PROPERTY(bool inputMethod READ isInputMethod)
public:
~Window() override;