KWin
Loading...
Searching...
No Matches
Public Types | Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Properties | Friends | List of all members
KWin::EffectsHandler Class Reference

Manager class that handles all the effects. More...

#include <effecthandler.h>

Inheritance diagram for KWin::EffectsHandler:
KWin::EffectsHandlerX11

Public Types

enum class  OnScreenMessageHideFlag { SkipsCloseAnimation = 1 }
 
using TouchBorderCallback = std::function<void(ElectricBorder border, const QPointF &, Output *screen)>
 

Public Slots

Q_SCRIPTABLE void reconfigureEffect (const QString &name)
 
Q_SCRIPTABLE bool loadEffect (const QString &name)
 
Q_SCRIPTABLE void toggleEffect (const QString &name)
 
Q_SCRIPTABLE void unloadEffect (const QString &name)
 
Q_SCRIPTABLE bool isEffectLoaded (const QString &name) const
 
Q_SCRIPTABLE bool isEffectSupported (const QString &name)
 
Q_SCRIPTABLE QList< bool > areEffectsSupported (const QStringList &names)
 
Q_SCRIPTABLE QString supportInformation (const QString &name) const
 
Q_SCRIPTABLE QString debug (const QString &name, const QString &parameter=QString()) const
 

Signals

void screenAdded (KWin::Output *screen)
 
void screenRemoved (KWin::Output *screen)
 
void desktopChanged (KWin::VirtualDesktop *oldDesktop, KWin::VirtualDesktop *newDesktop, KWin::EffectWindow *with)
 
void desktopChanging (KWin::VirtualDesktop *currentDesktop, QPointF offset, KWin::EffectWindow *with)
 
void desktopChangingCancelled ()
 
void desktopAdded (KWin::VirtualDesktop *desktop)
 
void desktopRemoved (KWin::VirtualDesktop *desktop)
 
void desktopGridSizeChanged (const QSize &size)
 
void desktopGridWidthChanged (int width)
 
void desktopGridHeightChanged (int height)
 
void showingDesktopChanged (bool)
 
void windowAdded (KWin::EffectWindow *w)
 
void windowClosed (KWin::EffectWindow *w)
 
void windowActivated (KWin::EffectWindow *w)
 
void windowDeleted (KWin::EffectWindow *w)
 
void tabBoxAdded (int mode)
 
void tabBoxClosed ()
 
void tabBoxUpdated ()
 
void tabBoxKeyEvent (QKeyEvent *event)
 
void mouseChanged (const QPointF &pos, const QPointF &oldpos, Qt::MouseButtons buttons, Qt::MouseButtons oldbuttons, Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers)
 
void cursorShapeChanged ()
 
void propertyNotify (KWin::EffectWindow *w, long atom)
 
void currentActivityChanged (const QString &id)
 
void activityAdded (const QString &id)
 
void activityRemoved (const QString &id)
 
void screenLockingChanged (bool locked)
 
void screenAboutToLock ()
 
void stackingOrderChanged ()
 
void screenEdgeApproaching (ElectricBorder border, qreal factor, const QRect &geometry)
 
void virtualScreenSizeChanged ()
 
void virtualScreenGeometryChanged ()
 
void windowDataChanged (KWin::EffectWindow *w, int role)
 
void xcbConnectionChanged ()
 
void activeFullScreenEffectChanged ()
 
void hasActiveFullScreenEffectChanged ()
 
void sessionStateChanged ()
 
void startupAdded (const QString &id, const QIcon &icon)
 
void startupChanged (const QString &id, const QIcon &icon)
 
void startupRemoved (const QString &id)
 
void inputPanelChanged ()
 

Public Member Functions

 EffectsHandler (Compositor *compositor, WorkspaceScene *scene)
 
 ~EffectsHandler () override
 
void startPaint ()
 
void prePaintScreen (ScreenPrePaintData &data, std::chrono::milliseconds presentTime)
 
void paintScreen (const RenderTarget &renderTarget, const RenderViewport &viewport, int mask, const QRegion &region, Output *screen)
 
void postPaintScreen ()
 
void prePaintWindow (EffectWindow *w, WindowPrePaintData &data, std::chrono::milliseconds presentTime)
 
void paintWindow (const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, const QRegion &region, WindowPaintData &data)
 
void postPaintWindow (EffectWindow *w)
 
void drawWindow (const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, const QRegion &region, WindowPaintData &data)
 
void renderWindow (const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, const QRegion &region, WindowPaintData &data)
 
QVariant kwinOption (KWinOption kwopt)
 
virtual void defineCursor (Qt::CursorShape shape)
 
QPointF cursorPos () const
 
bool grabKeyboard (Effect *effect)
 
void ungrabKeyboard ()
 
void startMouseInterception (Effect *effect, Qt::CursorShape shape)
 
void stopMouseInterception (Effect *effect)
 
bool isMouseInterception () const
 
bool checkInputWindowEvent (QMouseEvent *e)
 
bool checkInputWindowEvent (QWheelEvent *e)
 
void checkInputWindowStacking ()
 
void grabbedKeyboardEvent (QKeyEvent *e)
 
bool hasKeyboardGrab () const
 
void registerPointerShortcut (Qt::KeyboardModifiers modifiers, Qt::MouseButton pointerButtons, QAction *action)
 Registers a global pointer shortcut with the provided action.
 
void registerAxisShortcut (Qt::KeyboardModifiers modifiers, PointerAxisDirection axis, QAction *action)
 Registers a global axis shortcut with the provided action.
 
void registerTouchpadSwipeShortcut (SwipeDirection dir, uint fingerCount, QAction *onUp, std::function< void(qreal)> progressCallback={})
 Registers a global touchpad swipe gesture shortcut with the provided action.
 
void registerTouchpadPinchShortcut (PinchDirection dir, uint fingerCount, QAction *onUp, std::function< void(qreal)> progressCallback={})
 
void registerTouchscreenSwipeShortcut (SwipeDirection direction, uint fingerCount, QAction *action, std::function< void(qreal)> progressCallback)
 Registers a global touchscreen swipe gesture shortcut with the provided action.
 
void startMousePolling ()
 
void stopMousePolling ()
 
void reserveElectricBorder (ElectricBorder border, Effect *effect)
 
void unreserveElectricBorder (ElectricBorder border, Effect *effect)
 
void registerTouchBorder (ElectricBorder border, QAction *action)
 
void registerRealtimeTouchBorder (ElectricBorder border, QAction *action, TouchBorderCallback progressCallback)
 
void unregisterTouchBorder (ElectricBorder border, QAction *action)
 
void activateWindow (KWin::EffectWindow *c)
 
KWin::EffectWindowactiveWindow () const
 
Q_SCRIPTABLE void moveWindow (KWin::EffectWindow *w, const QPoint &pos, bool snap=false, double snapAdjust=1.0)
 
Q_SCRIPTABLE void windowToDesktops (KWin::EffectWindow *w, const QList< KWin::VirtualDesktop * > &desktops)
 
Q_SCRIPTABLE void windowToScreen (KWin::EffectWindow *w, Output *screen)
 
void setShowingDesktop (bool showing)
 
QString currentActivity () const
 
VirtualDesktopcurrentDesktop () const
 
QList< VirtualDesktop * > desktops () const
 
void setCurrentDesktop (KWin::VirtualDesktop *desktop)
 
QSize desktopGridSize () const
 
int desktopGridWidth () const
 
int desktopGridHeight () const
 
int workspaceWidth () const
 
int workspaceHeight () const
 
VirtualDesktopdesktopAtCoords (QPoint coords) const
 
QPoint desktopGridCoords (VirtualDesktop *desktop) const
 
QPoint desktopCoords (VirtualDesktop *desktop) const
 
Q_SCRIPTABLE KWin::VirtualDesktopdesktopAbove (KWin::VirtualDesktop *desktop=nullptr, bool wrap=true) const
 
Q_SCRIPTABLE KWin::VirtualDesktopdesktopToRight (KWin::VirtualDesktop *desktop=nullptr, bool wrap=true) const
 
Q_SCRIPTABLE KWin::VirtualDesktopdesktopBelow (KWin::VirtualDesktop *desktop=nullptr, bool wrap=true) const
 
Q_SCRIPTABLE KWin::VirtualDesktopdesktopToLeft (KWin::VirtualDesktop *desktop=nullptr, bool wrap=true) const
 
Q_SCRIPTABLE QString desktopName (KWin::VirtualDesktop *desktop) const
 
bool optionRollOverDesktops () const
 
OutputactiveScreen () const
 
QRectF clientArea (clientAreaOption, const Output *screen, const VirtualDesktop *desktop) const
 
QRectF clientArea (clientAreaOption, const EffectWindow *c) const
 
QRectF clientArea (clientAreaOption, const QPoint &p, const VirtualDesktop *desktop) const
 
QSize virtualScreenSize () const
 
QRect virtualScreenGeometry () const
 
double animationTimeFactor () const
 
Q_SCRIPTABLE KWin::EffectWindowfindWindow (WId id) const
 
Q_SCRIPTABLE KWin::EffectWindowfindWindow (SurfaceInterface *surf) const
 
Q_SCRIPTABLE KWin::EffectWindowfindWindow (QWindow *w) const
 
Q_SCRIPTABLE KWin::EffectWindowfindWindow (const QUuid &id) const
 
QList< EffectWindow * > stackingOrder () const
 
Q_SCRIPTABLE void setElevatedWindow (KWin::EffectWindow *w, bool set)
 
void setTabBoxWindow (EffectWindow *)
 
QList< EffectWindow * > currentTabBoxWindowList () const
 
void refTabBox ()
 
void unrefTabBox ()
 
void closeTabBox ()
 
EffectWindowcurrentTabBoxWindow () const
 
void setActiveFullScreenEffect (Effect *e)
 
EffectactiveFullScreenEffect () const
 
Q_SCRIPTABLE void addRepaintFull ()
 
Q_SCRIPTABLE void addRepaint (const QRectF &r)
 
Q_SCRIPTABLE void addRepaint (const QRect &r)
 
Q_SCRIPTABLE void addRepaint (const QRegion &r)
 
Q_SCRIPTABLE void addRepaint (int x, int y, int w, int h)
 
CompositingType compositingType () const
 
bool isOpenGLCompositing () const
 Whether the Compositor is OpenGL based (either GL 1 or 2).
 
QPainter * scenePainter ()
 Provides access to the QPainter which is rendering to the back buffer.
 
void reconfigure ()
 
QByteArray readRootProperty (long atom, long type, int format) const
 
xcb_atom_t announceSupportProperty (const QByteArray &propertyName, Effect *effect)
 Announces support for the feature with the given name. If no other Effect has announced support for this feature yet, an X11 property will be installed on the root window.
 
void removeSupportProperty (const QByteArray &propertyName, Effect *effect)
 Removes support for the feature with the given name. If there is no other Effect left which has announced support for the given property, the property will be removed from the root window.
 
bool hasDecorationShadows () const
 
bool decorationsHaveAlpha () const
 
void reloadEffect (Effect *effect)
 
Effectprovides (Effect::Feature ef)
 
EffectfindEffect (const QString &name) const
 
QStringList loadedEffects () const
 
QStringList listOfEffects () const
 
void unloadAllEffects ()
 
QStringList activeEffects () const
 
bool isEffectActive (const QString &pluginId) const
 
bool isScreenLocked () const
 
bool makeOpenGLContextCurrent ()
 Makes the OpenGL compositing context current.
 
void doneOpenGLContextCurrent ()
 Makes a null OpenGL context current resulting in no context being current.
 
xcb_connection_t * xcbConnection () const
 
xcb_window_t x11RootWindow () const
 
DisplaywaylandDisplay () const
 
bool animationsSupported () const
 
PlatformCursorImage cursorImage () const
 
void hideCursor ()
 
void showCursor ()
 
bool isCursorHidden () const
 
void startInteractiveWindowSelection (std::function< void(KWin::EffectWindow *)> callback)
 
void startInteractivePositionSelection (std::function< void(const QPointF &)> callback)
 
void showOnScreenMessage (const QString &message, const QString &iconName=QString())
 
void hideOnScreenMessage (OnScreenMessageHideFlags flags=OnScreenMessageHideFlags())
 
KSharedConfigPtr config () const
 
KSharedConfigPtr inputConfig () const
 
bool hasActiveFullScreenEffect () const
 
void renderOffscreenQuickView (const RenderTarget &renderTarget, const RenderViewport &viewport, OffscreenQuickView *effectQuickView) const
 
SessionState sessionState () const
 
QList< Output * > screens () const
 
OutputscreenAt (const QPoint &point) const
 
OutputfindScreen (const QString &name) const
 
OutputfindScreen (int screenId) const
 
KWin::EffectWindowinputPanel () const
 
bool isInputPanelOverlay () const
 
QQmlEngine * qmlEngine () const
 
bool blocksDirectScanout () const
 
WorkspaceScenescene () const
 
bool touchDown (qint32 id, const QPointF &pos, std::chrono::microseconds time)
 
bool touchMotion (qint32 id, const QPointF &pos, std::chrono::microseconds time)
 
bool touchUp (qint32 id, std::chrono::microseconds time)
 
bool tabletToolEvent (KWin::TabletEvent *event)
 
bool tabletToolButtonEvent (uint button, bool pressed, const KWin::TabletToolId &tabletToolId, std::chrono::microseconds time)
 
bool tabletPadButtonEvent (uint button, bool pressed, const KWin::TabletPadId &tabletPadId, std::chrono::microseconds time)
 
bool tabletPadStripEvent (int number, int position, bool isFinger, const KWin::TabletPadId &tabletPadId, std::chrono::microseconds time)
 
bool tabletPadRingEvent (int number, int position, bool isFinger, const KWin::TabletPadId &tabletPadId, std::chrono::microseconds time)
 
void highlightWindows (const QList< EffectWindow * > &windows)
 
bool isPropertyTypeRegistered (xcb_atom_t atom) const
 

Protected Types

typedef QList< Effect * > EffectsList
 
typedef EffectsList::const_iterator EffectsIterator
 
typedef QHash< QByteArray, QList< Effect * > > PropertyEffectMap
 

Protected Member Functions

void connectNotify (const QMetaMethod &signal) override
 
void disconnectNotify (const QMetaMethod &signal) override
 
void effectsChanged ()
 
void setupWindowConnections (KWin::Window *window)
 
virtual bool doGrabKeyboard ()
 
virtual void doUngrabKeyboard ()
 
virtual void doStartMouseInterception (Qt::CursorShape shape)
 
virtual void doStopMouseInterception ()
 
virtual void doCheckInputWindowStacking ()
 
void registerPropertyType (long atom, bool reg)
 
void destroyEffect (Effect *effect)
 
void reconfigureEffects ()
 

Protected Attributes

Effectkeyboard_grab_effect
 
Effectfullscreen_effect
 
QMultiMap< int, EffectPaireffect_order
 
QHash< long, int > registered_atoms
 
QList< EffectPairloaded_effects
 
CompositingType compositing_type
 
EffectsList m_activeEffects
 
EffectsIterator m_currentDrawWindowIterator
 
EffectsIterator m_currentPaintWindowIterator
 
EffectsIterator m_currentPaintScreenIterator
 
PropertyEffectMap m_propertiesForEffects
 
QHash< QByteArray, qulonglong > m_managedProperties
 
Compositorm_compositor
 
WorkspaceScenem_scene
 
QList< Effect * > m_grabbedMouseEffects
 
EffectLoaderm_effectLoader
 
int m_trackingCursorChanges
 
std::unique_ptr< WindowPropertyNotifyX11Filterm_x11WindowPropertyNotify
 

Properties

QStringList activeEffects
 
QStringList loadedEffects
 
QStringList listOfEffects
 
KWin::VirtualDesktopcurrentDesktop
 
QString currentActivity
 
KWin::EffectWindowactiveWindow
 
QSize desktopGridSize
 
int desktopGridWidth
 
int desktopGridHeight
 
int workspaceWidth
 
int workspaceHeight
 
QList< KWin::VirtualDesktop * > desktops
 
bool optionRollOverDesktops
 
KWin::OutputactiveScreen
 
qreal animationTimeFactor
 
QList< EffectWindow * > stackingOrder
 
bool decorationsHaveAlpha
 
CompositingType compositingType
 
QPointF cursorPos
 
QSize virtualScreenSize
 
QRect virtualScreenGeometry
 
bool hasActiveFullScreenEffect
 
KWin::SessionState sessionState
 
KWin::EffectWindowinputPanel
 

Friends

class Effect
 

Detailed Description

Manager class that handles all the effects.

This class creates Effect objects and calls it's appropriate methods.

Effect objects can call methods of this class to interact with the workspace, e.g. to activate or move a specific window, change current desktop or create a special input window to receive mouse and keyboard events.

Definition at line 107 of file effecthandler.h.

Member Typedef Documentation

◆ EffectsIterator

typedef EffectsList::const_iterator KWin::EffectsHandler::EffectsIterator
protected

Definition at line 1080 of file effecthandler.h.

◆ EffectsList

typedef QList<Effect *> KWin::EffectsHandler::EffectsList
protected

Definition at line 1079 of file effecthandler.h.

◆ PropertyEffectMap

typedef QHash<QByteArray, QList<Effect *> > KWin::EffectsHandler::PropertyEffectMap
protected

Definition at line 1092 of file effecthandler.h.

◆ TouchBorderCallback

using KWin::EffectsHandler::TouchBorderCallback = std::function<void(ElectricBorder border, const QPointF &, Output *screen)>

Definition at line 157 of file effecthandler.h.

Member Enumeration Documentation

◆ OnScreenMessageHideFlag

Flags for how to hide a shown on-screen-message

See also
hideOnScreenMessage
Since
5.9
Enumerator
SkipsCloseAnimation 

The on-screen-message should skip the close window animation.

See also
EffectWindow::skipsCloseAnimation

Definition at line 663 of file effecthandler.h.

Constructor & Destructor Documentation

◆ EffectsHandler()

KWin::EffectsHandler::EffectsHandler ( Compositor * compositor,
WorkspaceScene * scene )

Definition at line 116 of file effecthandler.cpp.

◆ ~EffectsHandler()

KWin::EffectsHandler::~EffectsHandler ( )
override

Definition at line 241 of file effecthandler.cpp.

Member Function Documentation

◆ activateWindow()

void KWin::EffectsHandler::activateWindow ( KWin::EffectWindow * c)

Definition at line 704 of file effecthandler.cpp.

◆ activeEffects()

QStringList KWin::EffectsHandler::activeEffects ( ) const

Definition at line 1293 of file effecthandler.cpp.

◆ activeFullScreenEffect()

Effect * KWin::EffectsHandler::activeFullScreenEffect ( ) const

Definition at line 414 of file effecthandler.cpp.

◆ activeFullScreenEffectChanged

void KWin::EffectsHandler::activeFullScreenEffectChanged ( )
signal

This signal is emitted when active fullscreen effect changed.

See also
activeFullScreenEffect
setActiveFullScreenEffect
Since
5.14

◆ activeScreen()

Output * KWin::EffectsHandler::activeScreen ( ) const

Definition at line 1003 of file effecthandler.cpp.

◆ activeWindow()

EffectWindow * KWin::EffectsHandler::activeWindow ( ) const

Definition at line 712 of file effecthandler.cpp.

◆ activityAdded

void KWin::EffectsHandler::activityAdded ( const QString & id)
signal

This signal is emitted when a new activity is added

Parameters
idid of the new activity
Since
4.9

◆ activityRemoved

void KWin::EffectsHandler::activityRemoved ( const QString & id)
signal

This signal is emitted when the activity is removed

Parameters
idid of the removed activity
Since
4.9

◆ addRepaint() [1/4]

void KWin::EffectsHandler::addRepaint ( const QRect & r)

Definition at line 983 of file effecthandler.cpp.

◆ addRepaint() [2/4]

void KWin::EffectsHandler::addRepaint ( const QRectF & r)

Definition at line 988 of file effecthandler.cpp.

◆ addRepaint() [3/4]

void KWin::EffectsHandler::addRepaint ( const QRegion & r)

Definition at line 993 of file effecthandler.cpp.

◆ addRepaint() [4/4]

void KWin::EffectsHandler::addRepaint ( int x,
int y,
int w,
int h )

Definition at line 998 of file effecthandler.cpp.

◆ addRepaintFull()

void KWin::EffectsHandler::addRepaintFull ( )

Schedules the entire workspace to be repainted next time. If you call it during painting (including prepaint) then it does not affect the current painting.

Definition at line 978 of file effecthandler.cpp.

◆ animationsSupported()

bool KWin::EffectsHandler::animationsSupported ( ) const

Whether animations are supported by the Scene. If this method returns false Effects are supposed to not animate transitions.

Returns
Whether the Scene can drive animations
Since
5.8

Definition at line 1402 of file effecthandler.cpp.

◆ animationTimeFactor()

double KWin::EffectsHandler::animationTimeFactor ( ) const

Factor by which animation speed in the effect should be modified (multiplied). If configurable in the effect itself, the option should have also 'default' animation speed. The actual value should be determined using animationTime(). Note: The factor can be also 0, so make sure your code can cope with 0ms time if used manually.

Definition at line 855 of file effecthandler.cpp.

◆ announceSupportProperty()

xcb_atom_t KWin::EffectsHandler::announceSupportProperty ( const QByteArray & propertyName,
Effect * effect )

Announces support for the feature with the given name. If no other Effect has announced support for this feature yet, an X11 property will be installed on the root window.

The Effect will be notified for events through the signal propertyNotify().

To remove the support again use removeSupportProperty. When an Effect is destroyed it is automatically taken care of removing the support. It is not required to call removeSupportProperty in the Effect's cleanup handling.

Parameters
propertyNameThe name of the property to announce support for
effectThe effect which announces support
Returns
xcb_atom_t The created X11 atom
See also
removeSupportProperty
Since
4.11

Definition at line 652 of file effecthandler.cpp.

◆ areEffectsSupported

QList< bool > KWin::EffectsHandler::areEffectsSupported ( const QStringList & names)
slot

Definition at line 1250 of file effecthandler.cpp.

◆ blocksDirectScanout()

bool KWin::EffectsHandler::blocksDirectScanout ( ) const
Returns
whether or not any effect is currently active where KWin should not use direct scanout

Definition at line 1317 of file effecthandler.cpp.

◆ checkInputWindowEvent() [1/2]

bool KWin::EffectsHandler::checkInputWindowEvent ( QMouseEvent * e)

Definition at line 1040 of file effecthandler.cpp.

◆ checkInputWindowEvent() [2/2]

bool KWin::EffectsHandler::checkInputWindowEvent ( QWheelEvent * e)

Definition at line 1051 of file effecthandler.cpp.

◆ checkInputWindowStacking()

void KWin::EffectsHandler::checkInputWindowStacking ( )

Definition at line 1086 of file effecthandler.cpp.

◆ clientArea() [1/3]

QRectF KWin::EffectsHandler::clientArea ( clientAreaOption opt,
const EffectWindow * c ) const

Definition at line 1013 of file effecthandler.cpp.

◆ clientArea() [2/3]

QRectF KWin::EffectsHandler::clientArea ( clientAreaOption opt,
const Output * screen,
const VirtualDesktop * desktop ) const

Definition at line 1008 of file effecthandler.cpp.

◆ clientArea() [3/3]

QRectF KWin::EffectsHandler::clientArea ( clientAreaOption opt,
const QPoint & p,
const VirtualDesktop * desktop ) const

Definition at line 1019 of file effecthandler.cpp.

◆ closeTabBox()

void KWin::EffectsHandler::closeTabBox ( )

Definition at line 961 of file effecthandler.cpp.

◆ compositingType()

CompositingType KWin::EffectsHandler::compositingType ( ) const

Definition at line 257 of file effecthandler.cpp.

◆ config()

KSharedConfigPtr KWin::EffectsHandler::config ( ) const

Definition at line 1466 of file effecthandler.cpp.

◆ connectNotify()

void KWin::EffectsHandler::connectNotify ( const QMetaMethod & signal)
overrideprotected

Definition at line 1062 of file effecthandler.cpp.

◆ currentActivity()

QString KWin::EffectsHandler::currentActivity ( ) const
Returns
The ID of the current activity.

Definition at line 753 of file effecthandler.cpp.

◆ currentActivityChanged

void KWin::EffectsHandler::currentActivityChanged ( const QString & id)
signal

This signal is emitted when the global activity is changed

Parameters
idid of the new current activity
Since
4.9

◆ currentDesktop()

VirtualDesktop * KWin::EffectsHandler::currentDesktop ( ) const
Returns
The current desktop.

Definition at line 765 of file effecthandler.cpp.

◆ currentTabBoxWindow()

EffectWindow * KWin::EffectsHandler::currentTabBoxWindow ( ) const

Definition at line 968 of file effecthandler.cpp.

◆ currentTabBoxWindowList()

QList< EffectWindow * > KWin::EffectsHandler::currentTabBoxWindowList ( ) const

Definition at line 930 of file effecthandler.cpp.

◆ cursorImage()

PlatformCursorImage KWin::EffectsHandler::cursorImage ( ) const

The current cursor image of the Platform.

See also
cursorPos
Since
5.9

Definition at line 1421 of file effecthandler.cpp.

◆ cursorPos()

QPointF KWin::EffectsHandler::cursorPos ( ) const

Definition at line 1098 of file effecthandler.cpp.

◆ cursorShapeChanged

void KWin::EffectsHandler::cursorShapeChanged ( )
signal

Signal emitted when the cursor shape changed. You'll likely want to query the current cursor as reaction: xcb_xfixes_get_cursor_image_unchecked Connection to this signal is tracked, so if you don't need it anymore, disconnect from it to stop cursor event filtering

◆ debug

QString KWin::EffectsHandler::debug ( const QString & name,
const QString & parameter = QString() ) const
slot

Definition at line 1381 of file effecthandler.cpp.

◆ decorationsHaveAlpha()

bool KWin::EffectsHandler::decorationsHaveAlpha ( ) const

Returns true if the window decorations use the alpha channel, and false otherwise.

Since
4.5

Definition at line 380 of file effecthandler.cpp.

◆ defineCursor()

void KWin::EffectsHandler::defineCursor ( Qt::CursorShape shape)
virtual

Sets the cursor while the mouse is intercepted.

See also
startMouseInterception
Since
4.11

Reimplemented in KWin::EffectsHandlerX11.

Definition at line 1035 of file effecthandler.cpp.

◆ desktopAbove()

VirtualDesktop * KWin::EffectsHandler::desktopAbove ( KWin::VirtualDesktop * desktop = nullptr,
bool wrap = true ) const
Returns
The desktop above the given desktop. Wraps around to the bottom of the layout if wrap is set. If id is not set use the current one.

Definition at line 825 of file effecthandler.cpp.

◆ desktopAdded

void KWin::EffectsHandler::desktopAdded ( KWin::VirtualDesktop * desktop)
signal

◆ desktopAtCoords()

VirtualDesktop * KWin::EffectsHandler::desktopAtCoords ( QPoint coords) const
Returns
The desktop at the point coords or 0 if no desktop exists at that point. coords is to be in grid units.

Definition at line 805 of file effecthandler.cpp.

◆ desktopBelow()

VirtualDesktop * KWin::EffectsHandler::desktopBelow ( KWin::VirtualDesktop * desktop = nullptr,
bool wrap = true ) const
Returns
The desktop below the given desktop. Wraps around to the top of the layout if wrap is set. If id is not set use the current one.

Definition at line 835 of file effecthandler.cpp.

◆ desktopChanged

void KWin::EffectsHandler::desktopChanged ( KWin::VirtualDesktop * oldDesktop,
KWin::VirtualDesktop * newDesktop,
KWin::EffectWindow * with )
signal

Signal emitted when the current desktop changed.

Parameters
oldDesktopThe previously current desktop
newDesktopThe new current desktop
withThe window which is taken over to the new desktop, can be NULL
Since
4.9

◆ desktopChanging

void KWin::EffectsHandler::desktopChanging ( KWin::VirtualDesktop * currentDesktop,
QPointF offset,
KWin::EffectWindow * with )
signal

Signal emmitted while desktop is changing for animation.

Parameters
currentDesktopThe current desktop untiotherwise.
offsetThe current desktop offset. offset.x() = .6 means 60% of the way to the desktop to the right. Positive Values means Up and Right.

◆ desktopChangingCancelled

void KWin::EffectsHandler::desktopChangingCancelled ( )
signal

◆ desktopCoords()

QPoint KWin::EffectsHandler::desktopCoords ( VirtualDesktop * desktop) const
Returns
The coords of the top-left corner of desktop in pixels.

Definition at line 815 of file effecthandler.cpp.

◆ desktopGridCoords()

QPoint KWin::EffectsHandler::desktopGridCoords ( VirtualDesktop * desktop) const
Returns
The coords of the specified desktop in grid units.

Definition at line 810 of file effecthandler.cpp.

◆ desktopGridHeight()

int KWin::EffectsHandler::desktopGridHeight ( ) const
Returns
The height of desktop layout in grid units.

Definition at line 790 of file effecthandler.cpp.

◆ desktopGridHeightChanged

void KWin::EffectsHandler::desktopGridHeightChanged ( int height)
signal

Emitted when the virtual desktop grid layout changes

Parameters
heightnew height
Since
5.25

◆ desktopGridSize()

QSize KWin::EffectsHandler::desktopGridSize ( ) const
Returns
The size of desktop layout in grid units.

Definition at line 780 of file effecthandler.cpp.

◆ desktopGridSizeChanged

void KWin::EffectsHandler::desktopGridSizeChanged ( const QSize & size)
signal

Emitted when the virtual desktop grid layout changes

Parameters
sizenew size
Since
5.25

◆ desktopGridWidth()

int KWin::EffectsHandler::desktopGridWidth ( ) const
Returns
The width of desktop layout in grid units.

Definition at line 785 of file effecthandler.cpp.

◆ desktopGridWidthChanged

void KWin::EffectsHandler::desktopGridWidthChanged ( int width)
signal

Emitted when the virtual desktop grid layout changes

Parameters
widthnew width
Since
5.25

◆ desktopName()

QString KWin::EffectsHandler::desktopName ( KWin::VirtualDesktop * desktop) const

Definition at line 845 of file effecthandler.cpp.

◆ desktopRemoved

void KWin::EffectsHandler::desktopRemoved ( KWin::VirtualDesktop * desktop)
signal

◆ desktops()

QList< VirtualDesktop * > KWin::EffectsHandler::desktops ( ) const
Returns
Total number of desktops currently in existence.

Definition at line 770 of file effecthandler.cpp.

◆ desktopToLeft()

VirtualDesktop * KWin::EffectsHandler::desktopToLeft ( KWin::VirtualDesktop * desktop = nullptr,
bool wrap = true ) const
Returns
The desktop to the left of the given desktop. Wraps around to the right of the layout if wrap is set. If id is not set use the current one.

Definition at line 840 of file effecthandler.cpp.

◆ desktopToRight()

VirtualDesktop * KWin::EffectsHandler::desktopToRight ( KWin::VirtualDesktop * desktop = nullptr,
bool wrap = true ) const
Returns
The desktop to the right of the given desktop. Wraps around to the left of the layout if wrap is set. If id is not set use the current one.

Definition at line 830 of file effecthandler.cpp.

◆ destroyEffect()

void KWin::EffectsHandler::destroyEffect ( Effect * effect)
protected

Definition at line 1186 of file effecthandler.cpp.

◆ disconnectNotify()

void KWin::EffectsHandler::disconnectNotify ( const QMetaMethod & signal)
overrideprotected

Definition at line 1074 of file effecthandler.cpp.

◆ doCheckInputWindowStacking()

void KWin::EffectsHandler::doCheckInputWindowStacking ( )
protectedvirtual

Default implementation does nothing

Reimplemented in KWin::EffectsHandlerX11.

Definition at line 1094 of file effecthandler.cpp.

◆ doGrabKeyboard()

bool KWin::EffectsHandler::doGrabKeyboard ( )
protectedvirtual

Default implementation does nothing and returns true.

Reimplemented in KWin::EffectsHandlerX11.

Definition at line 436 of file effecthandler.cpp.

◆ doneOpenGLContextCurrent()

void KWin::EffectsHandler::doneOpenGLContextCurrent ( )

Makes a null OpenGL context current resulting in no context being current.

If the compositing backend is not OpenGL based, this method is a noop.

There is normally no reason for an Effect to call this method.

Definition at line 1397 of file effecthandler.cpp.

◆ doStartMouseInterception()

void KWin::EffectsHandler::doStartMouseInterception ( Qt::CursorShape shape)
protectedvirtual

Default implementation sets Effects override cursor on the PointerInputRedirection.

Reimplemented in KWin::EffectsHandlerX11.

Definition at line 472 of file effecthandler.cpp.

◆ doStopMouseInterception()

void KWin::EffectsHandler::doStopMouseInterception ( )
protectedvirtual

Default implementation removes the Effects override cursor on the PointerInputRedirection.

Reimplemented in KWin::EffectsHandlerX11.

Definition at line 499 of file effecthandler.cpp.

◆ doUngrabKeyboard()

void KWin::EffectsHandler::doUngrabKeyboard ( )
protectedvirtual

Default implementation does nothing.

Reimplemented in KWin::EffectsHandlerX11.

Definition at line 449 of file effecthandler.cpp.

◆ drawWindow()

void KWin::EffectsHandler::drawWindow ( const RenderTarget & renderTarget,
const RenderViewport & viewport,
EffectWindow * w,
int mask,
const QRegion & region,
WindowPaintData & data )

Definition at line 360 of file effecthandler.cpp.

◆ effectsChanged()

void KWin::EffectsHandler::effectsChanged ( )
protected

Definition at line 1277 of file effecthandler.cpp.

◆ findEffect()

Effect * KWin::EffectsHandler::findEffect ( const QString & name) const

Definition at line 1476 of file effecthandler.cpp.

◆ findScreen() [1/2]

Output * KWin::EffectsHandler::findScreen ( const QString & name) const

Definition at line 1557 of file effecthandler.cpp.

◆ findScreen() [2/2]

Output * KWin::EffectsHandler::findScreen ( int screenId) const

Definition at line 1568 of file effecthandler.cpp.

◆ findWindow() [1/4]

EffectWindow * KWin::EffectsHandler::findWindow ( const QUuid & id) const

Finds the EffectWindow for the Window with KWin internal id. If there is no such window null is returned.

Since
5.16

Definition at line 889 of file effecthandler.cpp.

◆ findWindow() [2/4]

EffectWindow * KWin::EffectsHandler::findWindow ( QWindow * w) const

Finds the EffectWindow for the internal window w. If there is no such window null is returned.

On Wayland this returns the internal window. On X11 it returns an Unamanged with the window id matching that of the provided window w.

Since
5.16

Definition at line 881 of file effecthandler.cpp.

◆ findWindow() [3/4]

EffectWindow * KWin::EffectsHandler::findWindow ( SurfaceInterface * surf) const

Definition at line 871 of file effecthandler.cpp.

◆ findWindow() [4/4]

EffectWindow * KWin::EffectsHandler::findWindow ( WId id) const

Definition at line 860 of file effecthandler.cpp.

◆ grabbedKeyboardEvent()

void KWin::EffectsHandler::grabbedKeyboardEvent ( QKeyEvent * e)

Definition at line 453 of file effecthandler.cpp.

◆ grabKeyboard()

bool KWin::EffectsHandler::grabKeyboard ( Effect * effect)

Definition at line 424 of file effecthandler.cpp.

◆ hasActiveFullScreenEffect()

bool KWin::EffectsHandler::hasActiveFullScreenEffect ( ) const

Returns if activeFullScreenEffect is set

Definition at line 419 of file effecthandler.cpp.

◆ hasActiveFullScreenEffectChanged

void KWin::EffectsHandler::hasActiveFullScreenEffectChanged ( )
signal

This signal is emitted when active fullscreen effect changed to being set or unset

See also
activeFullScreenEffect
setActiveFullScreenEffect
Since
5.15

◆ hasDecorationShadows()

bool KWin::EffectsHandler::hasDecorationShadows ( ) const

Returns true if the active window decoration has shadow API hooks.

Definition at line 375 of file effecthandler.cpp.

◆ hasKeyboardGrab()

bool KWin::EffectsHandler::hasKeyboardGrab ( ) const

Definition at line 636 of file effecthandler.cpp.

◆ hideCursor()

void KWin::EffectsHandler::hideCursor ( )

The cursor image should be hidden.

See also
showCursor
Since
5.9

Definition at line 1426 of file effecthandler.cpp.

◆ hideOnScreenMessage()

void KWin::EffectsHandler::hideOnScreenMessage ( OnScreenMessageHideFlags flags = OnScreenMessageHideFlags())

Hides a previously shown on-screen-message again.

Parameters
flagsThe flags for how to hide the message
See also
showOnScreenMessage
Since
5.9

Definition at line 1457 of file effecthandler.cpp.

◆ highlightWindows()

void KWin::EffectsHandler::highlightWindows ( const QList< EffectWindow * > & windows)

Definition at line 1412 of file effecthandler.cpp.

◆ inputConfig()

KSharedConfigPtr KWin::EffectsHandler::inputConfig ( ) const
Returns
The global input configuration (kcminputrc)
Since
5.10

Definition at line 1471 of file effecthandler.cpp.

◆ inputPanel()

KWin::EffectWindow * KWin::EffectsHandler::inputPanel ( ) const

Definition at line 1578 of file effecthandler.cpp.

◆ inputPanelChanged

void KWin::EffectsHandler::inputPanelChanged ( )
signal

◆ isCursorHidden()

bool KWin::EffectsHandler::isCursorHidden ( ) const
Returns
Whether or not the cursor is currently hidden

Definition at line 1573 of file effecthandler.cpp.

◆ isEffectActive()

bool KWin::EffectsHandler::isEffectActive ( const QString & pluginId) const

Definition at line 1306 of file effecthandler.cpp.

◆ isEffectLoaded

bool KWin::EffectsHandler::isEffectLoaded ( const QString & name) const
slot

Definition at line 1228 of file effecthandler.cpp.

◆ isEffectSupported

bool KWin::EffectsHandler::isEffectSupported ( const QString & name)
slot

Definition at line 1237 of file effecthandler.cpp.

◆ isInputPanelOverlay()

bool KWin::EffectsHandler::isInputPanelOverlay ( ) const

Definition at line 1591 of file effecthandler.cpp.

◆ isMouseInterception()

bool KWin::EffectsHandler::isMouseInterception ( ) const

Definition at line 504 of file effecthandler.cpp.

◆ isOpenGLCompositing()

bool KWin::EffectsHandler::isOpenGLCompositing ( ) const

Whether the Compositor is OpenGL based (either GL 1 or 2).

Returns
bool true in case of OpenGL based Compositor, false otherwise

Definition at line 262 of file effecthandler.cpp.

◆ isPropertyTypeRegistered()

bool KWin::EffectsHandler::isPropertyTypeRegistered ( xcb_atom_t atom) const
inline

Definition at line 744 of file effecthandler.h.

◆ isScreenLocked()

bool KWin::EffectsHandler::isScreenLocked ( ) const

Whether the screen is currently considered as locked. Note for technical reasons this is not always possible to detect. The screen will only be considered as locked if the screen locking process implements the org.freedesktop.ScreenSaver interface.

Returns
true if the screen is currently locked, false otherwise
See also
screenLockingChanged
Since
4.11

Definition at line 1372 of file effecthandler.cpp.

◆ kwinOption()

QVariant KWin::EffectsHandler::kwinOption ( KWinOption kwopt)

Definition at line 1332 of file effecthandler.cpp.

◆ listOfEffects()

QStringList KWin::EffectsHandler::listOfEffects ( ) const

Definition at line 1154 of file effecthandler.cpp.

◆ loadedEffects()

QStringList KWin::EffectsHandler::loadedEffects ( ) const

Definition at line 1142 of file effecthandler.cpp.

◆ loadEffect

bool KWin::EffectsHandler::loadEffect ( const QString & name)
slot

Definition at line 1159 of file effecthandler.cpp.

◆ makeOpenGLContextCurrent()

bool KWin::EffectsHandler::makeOpenGLContextCurrent ( )

Makes the OpenGL compositing context current.

If the compositing backend is not using OpenGL, this method returns false.

Returns
bool true if the context became current, false otherwise.

Definition at line 1392 of file effecthandler.cpp.

◆ mouseChanged

void KWin::EffectsHandler::mouseChanged ( const QPointF & pos,
const QPointF & oldpos,
Qt::MouseButtons buttons,
Qt::MouseButtons oldbuttons,
Qt::KeyboardModifiers modifiers,
Qt::KeyboardModifiers oldmodifiers )
signal

Signal emitted when mouse changed. If an effect needs to get updated mouse positions, it needs to first call startMousePolling. For a fullscreen effect it is better to use an input window and react on windowInputMouseEvent.

Parameters
posThe new mouse position
oldposThe previously mouse position
buttonsThe pressed mouse buttons
oldbuttonsThe previously pressed mouse buttons
modifiersPressed keyboard modifiers
oldmodifiersPreviously pressed keyboard modifiers.
See also
startMousePolling
Since
4.7

◆ moveWindow()

void KWin::EffectsHandler::moveWindow ( KWin::EffectWindow * w,
const QPoint & pos,
bool snap = false,
double snapAdjust = 1.0 )

Definition at line 717 of file effecthandler.cpp.

◆ optionRollOverDesktops()

bool KWin::EffectsHandler::optionRollOverDesktops ( ) const

Definition at line 850 of file effecthandler.cpp.

◆ paintScreen()

void KWin::EffectsHandler::paintScreen ( const RenderTarget & renderTarget,
const RenderViewport & viewport,
int mask,
const QRegion & region,
Output * screen )

Definition at line 303 of file effecthandler.cpp.

◆ paintWindow()

void KWin::EffectsHandler::paintWindow ( const RenderTarget & renderTarget,
const RenderViewport & viewport,
EffectWindow * w,
int mask,
const QRegion & region,
WindowPaintData & data )

Definition at line 331 of file effecthandler.cpp.

◆ postPaintScreen()

void KWin::EffectsHandler::postPaintScreen ( )

Definition at line 313 of file effecthandler.cpp.

◆ postPaintWindow()

void KWin::EffectsHandler::postPaintWindow ( EffectWindow * w)

Definition at line 341 of file effecthandler.cpp.

◆ prePaintScreen()

void KWin::EffectsHandler::prePaintScreen ( ScreenPrePaintData & data,
std::chrono::milliseconds presentTime )

Definition at line 294 of file effecthandler.cpp.

◆ prePaintWindow()

void KWin::EffectsHandler::prePaintWindow ( EffectWindow * w,
WindowPrePaintData & data,
std::chrono::milliseconds presentTime )

Definition at line 322 of file effecthandler.cpp.

◆ propertyNotify

void KWin::EffectsHandler::propertyNotify ( KWin::EffectWindow * w,
long atom )
signal

Receives events registered for using registerPropertyType. Use readProperty() to get the property data. Note that the property may be already set on the window, so doing the same processing from windowAdded() (e.g. simply calling propertyNotify() from it) is usually needed.

Parameters
wThe window whose property changed, is null if it is a root window property
atomThe property
Since
4.7

◆ provides()

Effect * KWin::EffectsHandler::provides ( Effect::Feature ef)

Definition at line 350 of file effecthandler.cpp.

◆ qmlEngine()

QQmlEngine * KWin::EffectsHandler::qmlEngine ( ) const

Definition at line 1604 of file effecthandler.cpp.

◆ readRootProperty()

QByteArray KWin::EffectsHandler::readRootProperty ( long atom,
long type,
int format ) const

Definition at line 696 of file effecthandler.cpp.

◆ reconfigure()

void KWin::EffectsHandler::reconfigure ( )

Definition at line 288 of file effecthandler.cpp.

◆ reconfigureEffect

void KWin::EffectsHandler::reconfigureEffect ( const QString & name)
slot

Definition at line 1216 of file effecthandler.cpp.

◆ reconfigureEffects()

void KWin::EffectsHandler::reconfigureEffects ( )
protected

Definition at line 1208 of file effecthandler.cpp.

◆ refTabBox()

void KWin::EffectsHandler::refTabBox ( )

Definition at line 947 of file effecthandler.cpp.

◆ registerAxisShortcut()

void KWin::EffectsHandler::registerAxisShortcut ( Qt::KeyboardModifiers modifiers,
PointerAxisDirection axis,
QAction * action )

Registers a global axis shortcut with the provided action.

Parameters
modifiersThe keyboard modifiers which need to be holded
axisThe direction in which the axis needs to be moved
actionThe action which gets triggered when the shortcut matches

Definition at line 602 of file effecthandler.cpp.

◆ registerPointerShortcut()

void KWin::EffectsHandler::registerPointerShortcut ( Qt::KeyboardModifiers modifiers,
Qt::MouseButton pointerButtons,
QAction * action )

Registers a global pointer shortcut with the provided action.

Parameters
modifiersThe keyboard modifiers which need to be holded
pointerButtonsThe pointer buttons which need to be pressed
actionThe action which gets triggered when the shortcut matches

Definition at line 597 of file effecthandler.cpp.

◆ registerPropertyType()

void KWin::EffectsHandler::registerPropertyType ( long atom,
bool reg )
protected

Definition at line 641 of file effecthandler.cpp.

◆ registerRealtimeTouchBorder()

void KWin::EffectsHandler::registerRealtimeTouchBorder ( ElectricBorder border,
QAction * action,
EffectsHandler::TouchBorderCallback progressCallback )

Registers the given action for the given border to be activated through a touch swipe gesture.

If the border gets triggered through a touch swipe gesture the QAction::triggered signal gets invoked.

progressCallback will be dinamically called each time the touch position is updated to show the effect "partially" activated

To unregister the touch screen action either delete the action or invoke unregisterTouchBorder.

See also
unregisterTouchBorder
Since
5.25

Definition at line 1118 of file effecthandler.cpp.

◆ registerTouchBorder()

void KWin::EffectsHandler::registerTouchBorder ( ElectricBorder border,
QAction * action )

Registers the given action for the given border to be activated through a touch swipe gesture.

If the border gets triggered through a touch swipe gesture the QAction::triggered signal gets invoked.

To unregister the touch screen action either delete the action or invoke unregisterTouchBorder.

See also
unregisterTouchBorder
Since
5.10

Definition at line 1113 of file effecthandler.cpp.

◆ registerTouchpadPinchShortcut()

void KWin::EffectsHandler::registerTouchpadPinchShortcut ( PinchDirection dir,
uint fingerCount,
QAction * onUp,
std::function< void(qreal)> progressCallback = {} )

Definition at line 612 of file effecthandler.cpp.

◆ registerTouchpadSwipeShortcut()

void KWin::EffectsHandler::registerTouchpadSwipeShortcut ( SwipeDirection dir,
uint fingerCount,
QAction * onUp,
std::function< void(qreal)> progressCallback = {} )

Registers a global touchpad swipe gesture shortcut with the provided action.

Parameters
directionThe direction for the swipe
actionThe action which gets triggered when the gesture triggers
Since
5.10

Definition at line 607 of file effecthandler.cpp.

◆ registerTouchscreenSwipeShortcut()

void KWin::EffectsHandler::registerTouchscreenSwipeShortcut ( SwipeDirection direction,
uint fingerCount,
QAction * action,
std::function< void(qreal)> progressCallback )

Registers a global touchscreen swipe gesture shortcut with the provided action.

Parameters
directionThe direction for the swipe
actionThe action which gets triggered when the gesture triggers
Since
5.25

Definition at line 617 of file effecthandler.cpp.

◆ reloadEffect()

void KWin::EffectsHandler::reloadEffect ( Effect * effect)

Allows an effect to trigger a reload of itself. This can be used by an effect which needs to be reloaded when screen geometry changes. It is possible that the effect cannot be loaded again as it's supported method does no longer hold.

Parameters
effectThe effect to reload
Since
4.8

Definition at line 1262 of file effecthandler.cpp.

◆ removeSupportProperty()

void KWin::EffectsHandler::removeSupportProperty ( const QByteArray & propertyName,
Effect * effect )

Removes support for the feature with the given name. If there is no other Effect left which has announced support for the given property, the property will be removed from the root window.

In case the Effect had not registered support, calling this function does not change anything.

Parameters
propertyNameThe name of the property to remove support for
effectThe effect which had registered the property.
See also
announceSupportProperty
Since
4.11

Definition at line 674 of file effecthandler.cpp.

◆ renderOffscreenQuickView()

void KWin::EffectsHandler::renderOffscreenQuickView ( const RenderTarget & renderTarget,
const RenderViewport & viewport,
OffscreenQuickView * effectQuickView ) const

Render the supplied OffscreenQuickView onto the scene It can be called at any point during the scene rendering

Since
5.18

Definition at line 1487 of file effecthandler.cpp.

◆ renderWindow()

void KWin::EffectsHandler::renderWindow ( const RenderTarget & renderTarget,
const RenderViewport & viewport,
EffectWindow * w,
int mask,
const QRegion & region,
WindowPaintData & data )

Definition at line 370 of file effecthandler.cpp.

◆ reserveElectricBorder()

void KWin::EffectsHandler::reserveElectricBorder ( ElectricBorder border,
Effect * effect )

Definition at line 1103 of file effecthandler.cpp.

◆ scene()

WorkspaceScene * KWin::EffectsHandler::scene ( ) const
inline

Definition at line 727 of file effecthandler.h.

◆ scenePainter()

QPainter * KWin::EffectsHandler::scenePainter ( )

Provides access to the QPainter which is rendering to the back buffer.

Only relevant for CompositingType QPainterCompositing. For all other compositing types null is returned.

Returns
QPainter* The Scene's QPainter or null.

Definition at line 1128 of file effecthandler.cpp.

◆ screenAboutToLock

void KWin::EffectsHandler::screenAboutToLock ( )
signal

This signal is emitted just before the screen locker tries to grab keys and lock the screen Effects should release any grabs immediately

Since
5.17

◆ screenAdded

void KWin::EffectsHandler::screenAdded ( KWin::Output * screen)
signal

This signal is emitted whenever a new screen is added to the system.

◆ screenAt()

Output * KWin::EffectsHandler::screenAt ( const QPoint & point) const

Definition at line 1552 of file effecthandler.cpp.

◆ screenEdgeApproaching

void KWin::EffectsHandler::screenEdgeApproaching ( ElectricBorder border,
qreal factor,
const QRect & geometry )
signal

This signal is emitted when the user starts to approach the border with the mouse. The factor describes how far away the mouse is in a relative mean. The values are in [0.0, 1.0] with 0.0 being emitted when first entered and on leaving. The value 1.0 means that the border is reached with the mouse. So the values are well suited for animations. The signal is always emitted when the mouse cursor position changes.

Parameters
borderThe screen edge which is being approached
factorValue in range [0.0,1.0] to describe how close the mouse is to the border
geometryThe geometry of the edge which is being approached
Since
4.11

◆ screenLockingChanged

void KWin::EffectsHandler::screenLockingChanged ( bool locked)
signal

This signal is emitted when the screen got locked or unlocked.

Parameters
lockedtrue if the screen is now locked, false if it is now unlocked
Since
4.11

◆ screenRemoved

void KWin::EffectsHandler::screenRemoved ( KWin::Output * screen)
signal

This signal is emitted whenever a screen is removed from the system.

◆ screens()

QList< Output * > KWin::EffectsHandler::screens ( ) const

Returns the list of all the screens connected to the system.

Definition at line 1547 of file effecthandler.cpp.

◆ sessionState()

SessionState KWin::EffectsHandler::sessionState ( ) const

The status of the session i.e if the user is logging out

Since
5.18

Definition at line 1542 of file effecthandler.cpp.

◆ sessionStateChanged

void KWin::EffectsHandler::sessionStateChanged ( )
signal

This signal is emitted when the session state was changed

Since
5.18

◆ setActiveFullScreenEffect()

void KWin::EffectsHandler::setActiveFullScreenEffect ( Effect * e)

Definition at line 400 of file effecthandler.cpp.

◆ setCurrentDesktop()

void KWin::EffectsHandler::setCurrentDesktop ( KWin::VirtualDesktop * desktop)

Set the current desktop to desktop.

Definition at line 775 of file effecthandler.cpp.

◆ setElevatedWindow()

void KWin::EffectsHandler::setElevatedWindow ( KWin::EffectWindow * w,
bool set )

Definition at line 909 of file effecthandler.cpp.

◆ setShowingDesktop()

void KWin::EffectsHandler::setShowingDesktop ( bool showing)

Definition at line 748 of file effecthandler.cpp.

◆ setTabBoxWindow()

void KWin::EffectsHandler::setTabBoxWindow ( EffectWindow * w)

Definition at line 920 of file effecthandler.cpp.

◆ setupWindowConnections()

void KWin::EffectsHandler::setupWindowConnections ( KWin::Window * window)
protected

Definition at line 279 of file effecthandler.cpp.

◆ showCursor()

void KWin::EffectsHandler::showCursor ( )

The cursor image should be shown again after having been hidden.

See also
hideCursor
Since
5.9

Definition at line 1431 of file effecthandler.cpp.

◆ showingDesktopChanged

void KWin::EffectsHandler::showingDesktopChanged ( bool )
signal

Signal emitted when the desktop showing ("dashboard") state changed The desktop is risen to the keepAbove layer, you may want to elevate windows or such.

Since
5.3

◆ showOnScreenMessage()

void KWin::EffectsHandler::showOnScreenMessage ( const QString & message,
const QString & iconName = QString() )

Shows an on-screen-message. To hide it again use hideOnScreenMessage.

Parameters
messageThe message to show
iconNameThe optional themed icon name
See also
hideOnScreenMessage
Since
5.9

Definition at line 1452 of file effecthandler.cpp.

◆ stackingOrder()

QList< EffectWindow * > KWin::EffectsHandler::stackingOrder ( ) const

Definition at line 897 of file effecthandler.cpp.

◆ stackingOrderChanged

void KWin::EffectsHandler::stackingOrderChanged ( )
signal

This signels is emitted when ever the stacking order is change, ie. a window is risen or lowered

Since
4.10

◆ startInteractivePositionSelection()

void KWin::EffectsHandler::startInteractivePositionSelection ( std::function< void(const QPointF &)> callback)

Starts an interactive position selection process.

Once the user selected a position on the screen the callback is invoked with the selected point as argument. In case the user cancels the interactive position selection or selecting a position is currently not possible (e.g. screen locked) the callback is invoked with a point at -1 as x and y argument.

During the interactive window selection the cursor is turned into a crosshair cursor.

Parameters
callbackThe function to invoke once the interactive position selection ends
Since
5.9

Definition at line 1447 of file effecthandler.cpp.

◆ startInteractiveWindowSelection()

void KWin::EffectsHandler::startInteractiveWindowSelection ( std::function< void(KWin::EffectWindow *)> callback)

Starts an interactive window selection process.

Once the user selected a window the callback is invoked with the selected EffectWindow as argument. In case the user cancels the interactive window selection or selecting a window is currently not possible (e.g. screen locked) the callback is invoked with a nullptr argument.

During the interactive window selection the cursor is turned into a crosshair cursor.

Parameters
callbackThe function to invoke once the interactive window selection ends
Since
5.9

Definition at line 1436 of file effecthandler.cpp.

◆ startMouseInterception()

void KWin::EffectsHandler::startMouseInterception ( Effect * effect,
Qt::CursorShape shape )

Ensures that all mouse events are sent to the effect. No window will get the mouse events. Only fullscreen effects providing a custom user interface should be using this method. The input events are delivered to Effect::windowInputMouseEvent.

Note
This method does not perform an X11 mouse grab. On X11 a fullscreen input window is raised above all other windows, but no grab is performed.
Parameters
effectThe effect
shapeSets the cursor to be used while the mouse is intercepted
See also
stopMouseInterception
Effect::windowInputMouseEvent
Since
4.11

Definition at line 460 of file effecthandler.cpp.

◆ startMousePolling()

void KWin::EffectsHandler::startMousePolling ( )

Definition at line 622 of file effecthandler.cpp.

◆ startPaint()

void KWin::EffectsHandler::startPaint ( )

Definition at line 386 of file effecthandler.cpp.

◆ startupAdded

void KWin::EffectsHandler::startupAdded ( const QString & id,
const QIcon & icon )
signal

◆ startupChanged

void KWin::EffectsHandler::startupChanged ( const QString & id,
const QIcon & icon )
signal

◆ startupRemoved

void KWin::EffectsHandler::startupRemoved ( const QString & id)
signal

◆ stopMouseInterception()

void KWin::EffectsHandler::stopMouseInterception ( Effect * effect)

Releases the hold mouse interception for effect

See also
startMouseInterception
Since
4.11

Definition at line 488 of file effecthandler.cpp.

◆ stopMousePolling()

void KWin::EffectsHandler::stopMousePolling ( )

Definition at line 629 of file effecthandler.cpp.

◆ supportInformation

QString KWin::EffectsHandler::supportInformation ( const QString & name) const
slot

Definition at line 1349 of file effecthandler.cpp.

◆ tabBoxAdded

void KWin::EffectsHandler::tabBoxAdded ( int mode)
signal

Signal emitted when a tabbox is added. An effect who wants to replace the tabbox with itself should use refTabBox.

Parameters
modeThe TabBoxMode.
See also
refTabBox
tabBoxClosed
tabBoxUpdated
tabBoxKeyEvent
Since
4.7

◆ tabBoxClosed

void KWin::EffectsHandler::tabBoxClosed ( )
signal

Signal emitted when the TabBox was closed by KWin core. An effect which referenced the TabBox should use unrefTabBox to unref again.

See also
unrefTabBox
tabBoxAdded
Since
4.7

◆ tabBoxKeyEvent

void KWin::EffectsHandler::tabBoxKeyEvent ( QKeyEvent * event)
signal

Signal emitted when a key event, which is not handled by TabBox directly is, happens while TabBox is active. An effect might use the key event to e.g. change the selected window. An effect should only response to this signal if it referenced the TabBox with refTabBox.

Parameters
eventThe key event not handled by TabBox directly
See also
refTabBox
Since
4.7

◆ tabBoxUpdated

void KWin::EffectsHandler::tabBoxUpdated ( )
signal

Signal emitted when the selected TabBox window changed or the TabBox List changed. An effect should only response to this signal if it referenced the TabBox with refTabBox.

See also
refTabBox
currentTabBoxWindowList
currentTabBoxDesktopList
currentTabBoxWindow
currentTabBoxDesktop
Since
4.7

◆ tabletPadButtonEvent()

bool KWin::EffectsHandler::tabletPadButtonEvent ( uint button,
bool pressed,
const KWin::TabletPadId & tabletPadId,
std::chrono::microseconds time )

Definition at line 564 of file effecthandler.cpp.

◆ tabletPadRingEvent()

bool KWin::EffectsHandler::tabletPadRingEvent ( int number,
int position,
bool isFinger,
const KWin::TabletPadId & tabletPadId,
std::chrono::microseconds time )

Definition at line 586 of file effecthandler.cpp.

◆ tabletPadStripEvent()

bool KWin::EffectsHandler::tabletPadStripEvent ( int number,
int position,
bool isFinger,
const KWin::TabletPadId & tabletPadId,
std::chrono::microseconds time )

Definition at line 575 of file effecthandler.cpp.

◆ tabletToolButtonEvent()

bool KWin::EffectsHandler::tabletToolButtonEvent ( uint button,
bool pressed,
const KWin::TabletToolId & tabletToolId,
std::chrono::microseconds time )

Definition at line 553 of file effecthandler.cpp.

◆ tabletToolEvent()

bool KWin::EffectsHandler::tabletToolEvent ( KWin::TabletEvent * event)

Definition at line 542 of file effecthandler.cpp.

◆ toggleEffect

void KWin::EffectsHandler::toggleEffect ( const QString & name)
slot

Definition at line 1133 of file effecthandler.cpp.

◆ touchDown()

bool KWin::EffectsHandler::touchDown ( qint32 id,
const QPointF & pos,
std::chrono::microseconds time )

Definition at line 509 of file effecthandler.cpp.

◆ touchMotion()

bool KWin::EffectsHandler::touchMotion ( qint32 id,
const QPointF & pos,
std::chrono::microseconds time )

Definition at line 520 of file effecthandler.cpp.

◆ touchUp()

bool KWin::EffectsHandler::touchUp ( qint32 id,
std::chrono::microseconds time )

Definition at line 531 of file effecthandler.cpp.

◆ ungrabKeyboard()

void KWin::EffectsHandler::ungrabKeyboard ( )

Definition at line 441 of file effecthandler.cpp.

◆ unloadAllEffects()

void KWin::EffectsHandler::unloadAllEffects ( )

Definition at line 267 of file effecthandler.cpp.

◆ unloadEffect

void KWin::EffectsHandler::unloadEffect ( const QString & name)
slot

Definition at line 1167 of file effecthandler.cpp.

◆ unrefTabBox()

void KWin::EffectsHandler::unrefTabBox ( )

Definition at line 954 of file effecthandler.cpp.

◆ unregisterTouchBorder()

void KWin::EffectsHandler::unregisterTouchBorder ( ElectricBorder border,
QAction * action )

Unregisters the given action for the given touch border.

See also
registerTouchBorder
Since
5.10

Definition at line 1123 of file effecthandler.cpp.

◆ unreserveElectricBorder()

void KWin::EffectsHandler::unreserveElectricBorder ( ElectricBorder border,
Effect * effect )

Definition at line 1108 of file effecthandler.cpp.

◆ virtualScreenGeometry()

QRect KWin::EffectsHandler::virtualScreenGeometry ( ) const

The bounding geometry of all outputs combined. Always starts at (0,0) and has virtualScreenSize as it's size.

See also
virtualScreenSize()
virtualScreenGeometryChanged()
Since
5.0

Definition at line 1025 of file effecthandler.cpp.

◆ virtualScreenGeometryChanged

void KWin::EffectsHandler::virtualScreenGeometryChanged ( )
signal

Emitted whenever the virtualScreenGeometry changes.

See also
virtualScreenGeometry()
Since
5.0

◆ virtualScreenSize()

QSize KWin::EffectsHandler::virtualScreenSize ( ) const

The bounding size of all screens combined. Overlapping areas are not counted multiple times.

See also
virtualScreenGeometry()
virtualScreenSizeChanged()
Since
5.0

Definition at line 1030 of file effecthandler.cpp.

◆ virtualScreenSizeChanged

void KWin::EffectsHandler::virtualScreenSizeChanged ( )
signal

Emitted whenever the virtualScreenSize changes.

See also
virtualScreenSize()
Since
5.0

◆ waylandDisplay()

Display * KWin::EffectsHandler::waylandDisplay ( ) const

Interface to the Wayland display: this is relevant only on Wayland, on X11 it will be nullptr

Since
5.5

Definition at line 1324 of file effecthandler.cpp.

◆ windowActivated

void KWin::EffectsHandler::windowActivated ( KWin::EffectWindow * w)
signal

Signal emitted when a window get's activated.

Parameters
wThe new active window, or NULL if there is no active window.
Since
4.7

◆ windowAdded

void KWin::EffectsHandler::windowAdded ( KWin::EffectWindow * w)
signal

Signal emitted when a new window has been added to the Workspace.

Parameters
wThe added window
Since
4.7

◆ windowClosed

void KWin::EffectsHandler::windowClosed ( KWin::EffectWindow * w)
signal

Signal emitted when a window is being removed from the Workspace. An effect which wants to animate the window closing should connect to this signal and reference the window by using refWindow

Parameters
wThe window which is being closed
Since
4.7

◆ windowDataChanged

void KWin::EffectsHandler::windowDataChanged ( KWin::EffectWindow * w,
int role )
signal

This signal gets emitted when the data on EffectWindow w for role changed.

An Effect can connect to this signal to read the new value and react on it. E.g. an Effect which does not operate on windows grabbed by another Effect wants to cancel the already scheduled animation if another Effect adds a grab.

Parameters
wThe EffectWindow for which the data changed
roleThe data role which changed
See also
EffectWindow::setData
EffectWindow::data
Since
5.8.4

◆ windowDeleted

void KWin::EffectsHandler::windowDeleted ( KWin::EffectWindow * w)
signal

Signal emitted when a window is deleted. This means that a closed window is not referenced any more. An effect bookkeeping the closed windows should connect to this signal to clean up the internal references.

Parameters
wThe window which is going to be deleted.
See also
EffectWindow::refWindow
EffectWindow::unrefWindow
windowClosed
Since
4.7

◆ windowToDesktops()

void KWin::EffectsHandler::windowToDesktops ( KWin::EffectWindow * w,
const QList< KWin::VirtualDesktop * > & desktops )

Moves a window to the given desktops On X11, the window will end up on the last window in the list Setting this to an empty list will set the window on all desktops

Definition at line 731 of file effecthandler.cpp.

◆ windowToScreen()

void KWin::EffectsHandler::windowToScreen ( KWin::EffectWindow * w,
Output * screen )

Definition at line 740 of file effecthandler.cpp.

◆ workspaceHeight()

int KWin::EffectsHandler::workspaceHeight ( ) const
Returns
The height of desktop layout in pixels.

Definition at line 800 of file effecthandler.cpp.

◆ workspaceWidth()

int KWin::EffectsHandler::workspaceWidth ( ) const
Returns
The width of desktop layout in pixels.

Definition at line 795 of file effecthandler.cpp.

◆ x11RootWindow()

xcb_window_t KWin::EffectsHandler::x11RootWindow ( ) const

Definition at line 247 of file effecthandler.cpp.

◆ xcbConnection()

xcb_connection_t * KWin::EffectsHandler::xcbConnection ( ) const

Definition at line 252 of file effecthandler.cpp.

◆ xcbConnectionChanged

void KWin::EffectsHandler::xcbConnectionChanged ( )
signal

The xcb connection changed, either a new xcbConnection got created or the existing one got destroyed. Effects can use this to refetch the properties they want to set.

When the xcbConnection changes also the x11RootWindow becomes invalid.

See also
xcbConnection
x11RootWindow
Since
5.11

Friends And Related Symbol Documentation

◆ Effect

friend class Effect
friend

Definition at line 154 of file effecthandler.h.

Member Data Documentation

◆ compositing_type

CompositingType KWin::EffectsHandler::compositing_type
protected

Definition at line 1087 of file effecthandler.h.

◆ effect_order

QMultiMap<int, EffectPair> KWin::EffectsHandler::effect_order
protected

Definition at line 1084 of file effecthandler.h.

◆ fullscreen_effect

Effect* KWin::EffectsHandler::fullscreen_effect
protected

Definition at line 1083 of file effecthandler.h.

◆ keyboard_grab_effect

Effect* KWin::EffectsHandler::keyboard_grab_effect
protected

Definition at line 1082 of file effecthandler.h.

◆ loaded_effects

QList<EffectPair> KWin::EffectsHandler::loaded_effects
protected

Definition at line 1086 of file effecthandler.h.

◆ m_activeEffects

EffectsList KWin::EffectsHandler::m_activeEffects
protected

Definition at line 1088 of file effecthandler.h.

◆ m_compositor

Compositor* KWin::EffectsHandler::m_compositor
protected

Definition at line 1095 of file effecthandler.h.

◆ m_currentDrawWindowIterator

EffectsIterator KWin::EffectsHandler::m_currentDrawWindowIterator
protected

Definition at line 1089 of file effecthandler.h.

◆ m_currentPaintScreenIterator

EffectsIterator KWin::EffectsHandler::m_currentPaintScreenIterator
protected

Definition at line 1091 of file effecthandler.h.

◆ m_currentPaintWindowIterator

EffectsIterator KWin::EffectsHandler::m_currentPaintWindowIterator
protected

Definition at line 1090 of file effecthandler.h.

◆ m_effectLoader

EffectLoader* KWin::EffectsHandler::m_effectLoader
protected

Definition at line 1098 of file effecthandler.h.

◆ m_grabbedMouseEffects

QList<Effect *> KWin::EffectsHandler::m_grabbedMouseEffects
protected

Definition at line 1097 of file effecthandler.h.

◆ m_managedProperties

QHash<QByteArray, qulonglong> KWin::EffectsHandler::m_managedProperties
protected

Definition at line 1094 of file effecthandler.h.

◆ m_propertiesForEffects

PropertyEffectMap KWin::EffectsHandler::m_propertiesForEffects
protected

Definition at line 1093 of file effecthandler.h.

◆ m_scene

WorkspaceScene* KWin::EffectsHandler::m_scene
protected

Definition at line 1096 of file effecthandler.h.

◆ m_trackingCursorChanges

int KWin::EffectsHandler::m_trackingCursorChanges
protected

Definition at line 1099 of file effecthandler.h.

◆ m_x11WindowPropertyNotify

std::unique_ptr<WindowPropertyNotifyX11Filter> KWin::EffectsHandler::m_x11WindowPropertyNotify
protected

Definition at line 1100 of file effecthandler.h.

◆ registered_atoms

QHash<long, int> KWin::EffectsHandler::registered_atoms
protected

Definition at line 1085 of file effecthandler.h.

Property Documentation

◆ activeEffects

QStringList KWin::EffectsHandler::activeEffects
read

Definition at line 112 of file effecthandler.h.

◆ activeScreen

KWin::Output * KWin::EffectsHandler::activeScreen
read

Definition at line 126 of file effecthandler.h.

◆ activeWindow

KWin::EffectWindow * KWin::EffectsHandler::activeWindow
readwrite

Definition at line 118 of file effecthandler.h.

◆ animationTimeFactor

qreal KWin::EffectsHandler::animationTimeFactor
read

Factor by which animation speed in the effect should be modified (multiplied). If configurable in the effect itself, the option should have also 'default' animation speed. The actual value should be determined using animationTime(). Note: The factor can be also 0, so make sure your code can cope with 0ms time if used manually.

Definition at line 134 of file effecthandler.h.

◆ compositingType

CompositingType KWin::EffectsHandler::compositingType
read

Definition at line 140 of file effecthandler.h.

◆ currentActivity

QString KWin::EffectsHandler::currentActivity
read

Definition at line 117 of file effecthandler.h.

◆ currentDesktop

KWin::VirtualDesktop * KWin::EffectsHandler::currentDesktop
readwrite

Definition at line 116 of file effecthandler.h.

◆ cursorPos

QPointF KWin::EffectsHandler::cursorPos
read

Definition at line 141 of file effecthandler.h.

◆ decorationsHaveAlpha

bool KWin::EffectsHandler::decorationsHaveAlpha
read

Whether window decorations use the alpha channel.

Definition at line 139 of file effecthandler.h.

◆ desktopGridHeight

int KWin::EffectsHandler::desktopGridHeight
read

Definition at line 121 of file effecthandler.h.

◆ desktopGridSize

QSize KWin::EffectsHandler::desktopGridSize
read

Definition at line 119 of file effecthandler.h.

◆ desktopGridWidth

int KWin::EffectsHandler::desktopGridWidth
read

Definition at line 120 of file effecthandler.h.

◆ desktops

QList<KWin::VirtualDesktop *> KWin::EffectsHandler::desktops
read

Definition at line 124 of file effecthandler.h.

◆ hasActiveFullScreenEffect

bool KWin::EffectsHandler::hasActiveFullScreenEffect
read

Definition at line 144 of file effecthandler.h.

◆ inputPanel

KWin::EffectWindow * KWin::EffectsHandler::inputPanel
read

Definition at line 152 of file effecthandler.h.

◆ listOfEffects

QStringList KWin::EffectsHandler::listOfEffects
read

Definition at line 114 of file effecthandler.h.

◆ loadedEffects

QStringList KWin::EffectsHandler::loadedEffects
read

Definition at line 113 of file effecthandler.h.

◆ optionRollOverDesktops

bool KWin::EffectsHandler::optionRollOverDesktops
read

Definition at line 125 of file effecthandler.h.

◆ sessionState

KWin::SessionState KWin::EffectsHandler::sessionState
read

The status of the session i.e if the user is logging out

Since
5.18

Definition at line 150 of file effecthandler.h.

◆ stackingOrder

QList<EffectWindow *> KWin::EffectsHandler::stackingOrder
read

Definition at line 135 of file effecthandler.h.

◆ virtualScreenGeometry

QRect KWin::EffectsHandler::virtualScreenGeometry
read

Definition at line 143 of file effecthandler.h.

◆ virtualScreenSize

QSize KWin::EffectsHandler::virtualScreenSize
read

Definition at line 142 of file effecthandler.h.

◆ workspaceHeight

int KWin::EffectsHandler::workspaceHeight
read

Definition at line 123 of file effecthandler.h.

◆ workspaceWidth

int KWin::EffectsHandler::workspaceWidth
read

Definition at line 122 of file effecthandler.h.


The documentation for this class was generated from the following files: