KWin
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | List of all members
KWin::UserActionsMenu Class Reference

Menu shown for a Window. More...

#include <useractions.h>

Inheritance diagram for KWin::UserActionsMenu:

Public Slots

void showHideActivityMenu ()
 

Public Member Functions

 UserActionsMenu (QObject *parent=nullptr)
 
 ~UserActionsMenu () override
 
void discard ()
 
bool isShown () const
 
void grabInput ()
 
bool hasWindow () const
 
bool isMenuWindow (const Window *window) const
 
void close ()
 
void show (const QRect &pos, Window *window)
 Shows the menu at the given pos for the given window.
 

Detailed Description

Menu shown for a Window.

The UserActionsMenu implements the Menu which is shown on:

The menu contains various window management related actions for the Window the menu is opened for, this is normally the active Window.

The menu which is shown is tried to be as close as possible to the menu implemented in libtaskmanager, though there are differences as there are some actions only the window manager can provide and on the other hand the libtaskmanager cares also about things like e.g. grouping.

Whenever the menu is changed it should be tried to also adjust the menu in libtaskmanager.

Author
Martin Gräßlin mgrae.nosp@m.ssli.nosp@m.n@kde.nosp@m..org

Definition at line 45 of file useractions.h.

Constructor & Destructor Documentation

◆ UserActionsMenu()

KWin::UserActionsMenu::UserActionsMenu ( QObject * parent = nullptr)
explicit

Definition at line 68 of file useractions.cpp.

◆ ~UserActionsMenu()

KWin::UserActionsMenu::~UserActionsMenu ( )
override

Definition at line 90 of file useractions.cpp.

Member Function Documentation

◆ close()

void KWin::UserActionsMenu::close ( )

Closes the Menu and prepares it for next usage.

Definition at line 105 of file useractions.cpp.

◆ discard()

void KWin::UserActionsMenu::discard ( )

Discards the constructed menu, so that it gets recreates on next show event.

See also
show

Definition at line 294 of file useractions.cpp.

◆ grabInput()

void KWin::UserActionsMenu::grabInput ( )

grabs keyboard and mouse, workaround(?) for bug #351112

Definition at line 141 of file useractions.cpp.

◆ hasWindow()

bool KWin::UserActionsMenu::hasWindow ( ) const
Returns
Whether the menu has a Window set to operate on.

Definition at line 100 of file useractions.cpp.

◆ isMenuWindow()

bool KWin::UserActionsMenu::isMenuWindow ( const Window * window) const

Checks whether the given Window window is the Window for which the Menu is shown.

Parameters
cThe Window to compare
Returns
Whether the Window is the one related to this Menu

Definition at line 113 of file useractions.cpp.

◆ isShown()

bool KWin::UserActionsMenu::isShown ( ) const
Returns
Whether the menu is currently visible

Definition at line 95 of file useractions.cpp.

◆ show()

void KWin::UserActionsMenu::show ( const QRect & pos,
Window * window )

Shows the menu at the given pos for the given window.

Parameters
posThe position where the menu should be shown.
windowThe Window for which the Menu has to be shown.

Definition at line 118 of file useractions.cpp.

◆ showHideActivityMenu

void KWin::UserActionsMenu::showHideActivityMenu ( )
slot

Delayed initialization of the activity menu.

The call to retrieve the current list of activities is performed in a thread and this slot is invoked once the list has been fetched. Only task of this method is to decide whether to show the activity menu and to invoke the initialization of it.

See also
initActivityPopup

Definition at line 379 of file useractions.cpp.


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