KWin
KWin::Client Class Reference
The Client class encapsulates a window decoration frame. More...
#include <client.h>

Public Types | |
enum | Sizemode { SizemodeAny, SizemodeFixedW, SizemodeFixedH, SizemodeMax } |
Public Member Functions | |
QRect | adjustedClientArea (const QRect &desktop, const QRect &area) const |
QSize | adjustedSize () const |
QSize | adjustedSize (const QSize &, Sizemode mode=SizemodeAny) const |
ClientList | allMainClients () const |
void | applyWindowRules () |
Layer | belongsToLayer () const |
const QPoint | calculateGravitation (bool invert, int gravity=0) const |
void | cancelAutoRaise () |
void | cancelShadeHoverTimer () |
QString | caption (bool full=true) const |
void | changeClientLeaderGroup (Group *gr) |
void | checkActiveModal () |
bool | checkBorderSizes (bool also_resize) |
void | checkGroup (Group *gr=NULL, bool force=false) |
void | checkTransient (Window w) |
void | checkWorkspacePosition () |
Client (Workspace *ws) | |
virtual QPoint | clientPos () const |
virtual QSize | clientSize () const |
void | closeWindow () |
Colormap | colormap () const |
Window | decorationId () const |
void | demandAttention (bool set=true) |
virtual int | desktop () const |
void | destroyClient () |
virtual bool | eventFilter (QObject *o, QEvent *e) |
Client * | findModal (bool allow_itself=false) |
virtual void | finishCompositing () |
int | fullScreenMode () const |
QRect | geometryFSRestore () const |
QRect | geometryRestore () const |
void | gotPing (Time timestamp) |
Group * | group () |
const Group * | group () const |
bool | groupTransient () const |
void | growHorizontal () |
void | growVertical () |
bool | hasNETSupport () const |
bool | hasStrut () const |
bool | hasTransient (const Client *c, bool indirect) const |
bool | hasUserTimeSupport () const |
bool | hiddenPreview () const |
void | hideClient (bool hide) |
QPixmap | icon () const |
QRect | iconGeometry () const |
bool | ignoreFocusStealing () const |
void | invalidateLayer () |
bool | isActive () const |
bool | isActiveFullScreen () const |
bool | isCloseable () const |
bool | isFullScreen () const |
bool | isFullScreenable (bool fullscreen_hack=false) const |
bool | isHiddenInternal () const |
bool | isMaximizable () const |
bool | isMinimizable () const |
bool | isMinimized () const |
bool | isModal () const |
bool | isMovable () const |
bool | isMovableAcrossScreens () const |
bool | isMove () const |
bool | isResizable () const |
bool | isResize () const |
bool | isShade () const |
bool | isShadeable () const |
bool | isShown (bool shaded_is_shown) const |
bool | isSpecialWindow () const |
bool | isTransient () const |
bool | keepAbove () const |
bool | keepBelow () const |
void | keepInArea (QRect area, bool partial=false) |
void | keyPressEvent (uint key_code) |
void | killWindow () |
Layer | layer () const |
ClientList | mainClients () const |
bool | manage (Window w, bool isMapped) |
QRegion | mask () const |
void | maximize (MaximizeMode) |
MaximizeMode | maximizeMode () const |
MaximizeMode | maximizeModeRestore () const |
QSize | maxSize () const |
QPixmap | miniIcon () const |
void | minimize (bool avoid_animation=false) |
QSize | minSize () const |
void | move (const QPoint &p, ForceGeometry_t force=NormalGeometrySet) |
void | move (int x, int y, ForceGeometry_t force=NormalGeometrySet) |
Window | moveResizeGrabWindow () const |
void | NETMoveResize (int x_root, int y_root, NET::Direction direction) |
void | NETMoveResizeWindow (int flags, int x, int y, int width, int height) |
bool | noBorder () const |
bool | performMouseCommand (Options::MouseCommand, const QPoint &globalPos, bool handled=false) |
void | plainResize (const QSize &s, ForceGeometry_t force=NormalGeometrySet) |
void | plainResize (int w, int h, ForceGeometry_t force=NormalGeometrySet) |
bool | providesContextHelp () const |
void | releaseWindow (bool on_shutdown=false) |
void | removeRule (Rules *r) |
void | repaintDecoration () |
void | resizeWithChecks (const QSize &s, ForceGeometry_t force=NormalGeometrySet) |
void | resizeWithChecks (int w, int h, ForceGeometry_t force=NormalGeometrySet) |
void | restackWindow (Window above, int detail, NET::RequestSource source, Time timestamp, bool send_event=false) |
const WindowRules * | rules () const |
int | sessionStackingOrder () const |
void | setActive (bool) |
void | setDesktop (int) |
void | setFullScreen (bool set, bool user) |
void | setGeometry (const QRect &r, ForceGeometry_t force=NormalGeometrySet) |
void | setGeometry (int x, int y, int w, int h, ForceGeometry_t force=NormalGeometrySet) |
void | setKeepAbove (bool) |
void | setKeepBelow (bool) |
void | setMask (const QRegion &r, int mode=X::Unsorted) |
void | setMaximize (bool vertically, bool horizontally) |
void | setModal (bool modal) |
void | setNoBorder (bool set) |
void | setOnAllDesktops (bool set) |
void | setShade (ShadeMode mode) |
void | setShortcut (const QString &cut) |
void | setSkipPager (bool) |
void | setSkipTaskbar (bool set, bool from_outside) |
virtual void | setupCompositing () |
void | setupWindowRules (bool ignore_temporary) |
ShadeMode | shadeMode () const |
double | shadowBrightness (ShadowType type) const |
double | shadowOpacity (ShadowType type) const |
QList< QRect > | shadowQuads (ShadowType type) const |
double | shadowSaturation (ShadowType type) const |
KShortcut | shortcut () const |
void | showContextHelp () |
void | shrinkHorizontal () |
void | shrinkVertical () |
bool | skipPager () const |
bool | skipTaskbar (bool from_outside=false) const |
void | takeActivity (int flags, bool handled, allowed_t) |
void | takeFocus (allowed_t) |
void | toggleShade () |
Client * | transientFor () |
const Client * | transientFor () const |
const ClientList & | transients () const |
void | unminimize (bool avoid_animation=false) |
void | updateCaption () |
void | updateDecoration (bool check_workspace_pos, bool force=false) |
void | updateFullscreenMonitors (NETFullscreenMonitors topology) |
void | updateMouseGrab () |
void | updateShape () |
void | updateUserTime (Time time=CurrentTime) |
void | updateVisibility () |
void | updateWindowRules () |
bool | userCanSetFullScreen () const |
bool | userCanSetNoBorder () const |
Time | userTime () const |
bool | wantsInput () const |
bool | wantsTabFocus () const |
bool | wasOriginallyGroupTransient () const |
bool | windowEvent (XEvent *e) |
Window | wrapperId () const |
Static Public Member Functions | |
static bool | belongToSameApplication (const Client *c1, const Client *c2, bool active_hack=false) |
static void | deleteClient (Client *c, allowed_t) |
static void | readIcons (Window win, QPixmap *icon, QPixmap *miniicon) |
static bool | sameAppWindowRoleMatch (const Client *c1, const Client *c2, bool active_hack) |
Protected Member Functions | |
virtual void | debug (kdbgstream &stream) const |
virtual bool | shouldUnredirect () const |
Friends | |
bool | performTransiencyCheck () |
Detailed Description
The Client class encapsulates a window decoration frame.Definition at line 62 of file client.h.
Member Enumeration Documentation
Constructor & Destructor Documentation
KWin::Client::Client | ( | Workspace * | ws | ) |
This ctor is "dumb" - it only initializes data.
All the real initialization is done in manage().
Definition at line 76 of file client.cpp.
Member Function Documentation
Returns area with the client's strut taken into account.
Used from Workspace in updateClientArea.
Definition at line 842 of file geometry.cpp.
QSize KWin::Client::adjustedSize | ( | ) | const |
Definition at line 1140 of file geometry.cpp.
Adjust the frame size frame according to he window's size hints.
Definition at line 1126 of file geometry.cpp.
ClientList KWin::Client::allMainClients | ( | ) | const |
Layer KWin::Client::belongsToLayer | ( | ) | const |
Definition at line 828 of file layers.cpp.
const QPoint KWin::Client::calculateGravitation | ( | bool | invert, | |
int | gravity = 0 | |||
) | const |
Definition at line 1440 of file geometry.cpp.
void KWin::Client::cancelAutoRaise | ( | ) |
Definition at line 1721 of file client.cpp.
void KWin::Client::cancelShadeHoverTimer | ( | ) |
Definition at line 804 of file client.cpp.
QString KWin::Client::caption | ( | bool | full = true |
) | const |
void KWin::Client::changeClientLeaderGroup | ( | Group * | gr | ) |
bool KWin::Client::checkBorderSizes | ( | bool | also_resize | ) |
Definition at line 370 of file client.cpp.
void KWin::Client::checkGroup | ( | Group * | gr = NULL , |
|
bool | force = false | |||
) |
void KWin::Client::checkWorkspacePosition | ( | ) |
Definition at line 992 of file geometry.cpp.
QPoint KWin::Client::clientPos | ( | ) | const [inline, virtual] |
QSize KWin::Client::clientSize | ( | ) | const [inline, virtual] |
void KWin::Client::closeWindow | ( | ) |
Closes the window by either sending a delete_window message or using XKill.
Definition at line 1031 of file client.cpp.
void KWin::Client::debug | ( | kdbgstream & | stream | ) | const [protected, virtual] |
void KWin::Client::demandAttention | ( | bool | set = true |
) |
Definition at line 708 of file activation.cpp.
int KWin::Client::desktop | ( | ) | const [virtual] |
Returns the virtual desktop within the workspace() the client window is located in, 0 if it isn't located on any special desktop (not mapped yet), or NET::OnAllDesktops.
Do not use desktop() directly, use isOnDesktop() instead.
Implements KWin::Toplevel.
Definition at line 1227 of file client.cpp.
void KWin::Client::destroyClient | ( | ) |
Like releaseWindow(), but this one is called when the window has been already destroyed (E.g.
The application closed it)
Definition at line 264 of file client.cpp.
Client * KWin::Client::findModal | ( | bool | allow_itself = false |
) |
void KWin::Client::finishCompositing | ( | ) | [virtual] |
void KWin::Client::gotPing | ( | Time | timestamp | ) |
Definition at line 1091 of file client.cpp.
void KWin::Client::growHorizontal | ( | ) |
Definition at line 640 of file placement.cpp.
void KWin::Client::growVertical | ( | ) |
Definition at line 685 of file placement.cpp.
bool KWin::Client::hasNETSupport | ( | ) | const [inline] |
bool KWin::Client::hasStrut | ( | ) | const |
Definition at line 948 of file geometry.cpp.
bool KWin::Client::hasTransient | ( | const Client * | c, | |
bool | indirect | |||
) | const |
bool KWin::Client::hiddenPreview | ( | ) | const [inline] |
void KWin::Client::hideClient | ( | bool | hide | ) |
Hides a client - Basically like minimize, but without effects, it's simply hidden.
Definition at line 612 of file client.cpp.
QRect KWin::Client::iconGeometry | ( | ) | const |
Definition at line 689 of file client.cpp.
bool KWin::Client::isActiveFullScreen | ( | ) | const |
Definition at line 852 of file layers.cpp.
bool KWin::Client::isCloseable | ( | ) | const |
May be closed by the user (May have a close button).
Returns whether the window may be closed (have a close button).
Definition at line 1023 of file client.cpp.
bool KWin::Client::isFullScreenable | ( | bool | fullscreen_hack = false |
) | const |
Definition at line 2262 of file geometry.cpp.
bool KWin::Client::isMaximizable | ( | ) | const |
Definition at line 1750 of file geometry.cpp.
bool KWin::Client::isMinimizable | ( | ) | const |
bool KWin::Client::isMovable | ( | ) | const |
Returns whether the window is moveable or has a fixed position.
Definition at line 1701 of file geometry.cpp.
bool KWin::Client::isMovableAcrossScreens | ( | ) | const |
Returns whether the window is moveable across Xinerama screens
Definition at line 1717 of file geometry.cpp.
bool KWin::Client::isResizable | ( | ) | const |
Returns whether the window is resizable or has a fixed size.
Definition at line 1731 of file geometry.cpp.
bool KWin::Client::isShadeable | ( | ) | const |
Definition at line 708 of file client.cpp.
bool KWin::Client::isShown | ( | bool | shaded_is_shown | ) | const [inline] |
bool KWin::Client::isSpecialWindow | ( | ) | const |
Returns true for "special" windows and false for windows which are "normal" (normal=window which has a border, can be moved by the user, can be closed, etc.
) true for Desktop, Dock, Splash, Override and TopMenu (and Toolbar??? - for now) false for Normal, Dialog, Utility and Menu (and Toolbar??? - not yet) TODO
Definition at line 1628 of file client.cpp.
void KWin::Client::keepInArea | ( | QRect | area, | |
bool | partial = false | |||
) |
Definition at line 804 of file geometry.cpp.
void KWin::Client::keyPressEvent | ( | uint | key_code | ) |
Definition at line 1565 of file events.cpp.
void KWin::Client::killWindow | ( | ) |
Layer KWin::Client::layer | ( | ) | const |
Definition at line 821 of file layers.cpp.
ClientList KWin::Client::mainClients | ( | ) | const |
bool KWin::Client::manage | ( | Window | w, | |
bool | isMapped | |||
) |
Manages the clients.
This means handling the very first maprequest: reparenting, initial geometry, initial state, placement, etc. Returns false if KWin is not going to manage this window.
Definition at line 43 of file manage.cpp.
QRegion KWin::Client::mask | ( | ) | const |
Definition at line 605 of file client.cpp.
void KWin::Client::maximize | ( | MaximizeMode | m | ) |
Definition at line 2001 of file geometry.cpp.
Client::MaximizeMode KWin::Client::maximizeMode | ( | ) | const [inline] |
Client::MaximizeMode KWin::Client::maximizeModeRestore | ( | ) | const [inline] |
QSize KWin::Client::maxSize | ( | ) | const |
Definition at line 1413 of file geometry.cpp.
void KWin::Client::minimize | ( | bool | avoid_animation = false |
) |
QSize KWin::Client::minSize | ( | ) | const |
Definition at line 1408 of file geometry.cpp.
void KWin::Client::move | ( | const QPoint & | p, | |
ForceGeometry_t | force = NormalGeometrySet | |||
) | [inline] |
void KWin::Client::move | ( | int | x, | |
int | y, | |||
ForceGeometry_t | force = NormalGeometrySet | |||
) |
Reimplemented to inform the client about the new window position.
Definition at line 1940 of file geometry.cpp.
Window KWin::Client::moveResizeGrabWindow | ( | ) | const [inline] |
void KWin::Client::NETMoveResize | ( | int | x_root, | |
int | y_root, | |||
NET::Direction | direction | |||
) |
Definition at line 1517 of file events.cpp.
void KWin::Client::NETMoveResizeWindow | ( | int | flags, | |
int | x, | |||
int | y, | |||
int | width, | |||
int | height | |||
) |
Definition at line 1682 of file geometry.cpp.
bool KWin::Client::noBorder | ( | ) | const |
Definition at line 473 of file client.cpp.
bool KWin::Client::performMouseCommand | ( | Options::MouseCommand | command, | |
const QPoint & | globalPos, | |||
bool | handled = false | |||
) |
Performs a mouse command on this client (see options.h)
Definition at line 770 of file useractions.cpp.
void KWin::Client::plainResize | ( | const QSize & | s, | |
ForceGeometry_t | force = NormalGeometrySet | |||
) | [inline] |
void KWin::Client::plainResize | ( | int | w, | |
int | h, | |||
ForceGeometry_t | force = NormalGeometrySet | |||
) |
bool KWin::Client::providesContextHelp | ( | ) | const |
Returns whether the window provides context help or not.
If it does, you should show a help menu item or a help button like '?' and call contextHelp() if this is invoked.
- See also:
- contextHelp()
Definition at line 1306 of file client.cpp.
Definition at line 1473 of file client.cpp.
void KWin::Client::releaseWindow | ( | bool | on_shutdown = false |
) |
Releases the window.
The client has done its job and the window is still existing.
Definition at line 196 of file client.cpp.
void KWin::Client::repaintDecoration | ( | ) |
Definition at line 399 of file client.cpp.
void KWin::Client::resizeWithChecks | ( | const QSize & | s, | |
ForceGeometry_t | force = NormalGeometrySet | |||
) | [inline] |
void KWin::Client::resizeWithChecks | ( | int | w, | |
int | h, | |||
ForceGeometry_t | force = NormalGeometrySet | |||
) |
resizeWithChecks() resizes according to gravity, and checks workarea position
Definition at line 1601 of file geometry.cpp.
void KWin::Client::restackWindow | ( | Window | above, | |
int | detail, | |||
NET::RequestSource | source, | |||
Time | timestamp, | |||
bool | send_event = false | |||
) |
Definition at line 763 of file layers.cpp.
const WindowRules * KWin::Client::rules | ( | ) | const [inline] |
void KWin::Client::setActive | ( | bool | act | ) |
Sets the client's active state to act.
This function does only change the visual appearance of the client, it does not change the focus setting. Use Workspace::activateClient() or Workspace::requestFocus() instead.
If a client receives or looses the focus, it calls setActive() on its own.
Definition at line 859 of file activation.cpp.
void KWin::Client::setDesktop | ( | int | desktop | ) |
Definition at line 1198 of file client.cpp.
void KWin::Client::setFullScreen | ( | bool | set, | |
bool | user | |||
) |
Definition at line 2290 of file geometry.cpp.
void KWin::Client::setGeometry | ( | const QRect & | r, | |
ForceGeometry_t | force = NormalGeometrySet | |||
) | [inline] |
void KWin::Client::setGeometry | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h, | |||
ForceGeometry_t | force = NormalGeometrySet | |||
) |
Reimplemented to inform the client about the new window position.
Definition at line 1778 of file geometry.cpp.
void KWin::Client::setKeepAbove | ( | bool | b | ) |
Definition at line 783 of file layers.cpp.
void KWin::Client::setKeepBelow | ( | bool | b | ) |
Definition at line 802 of file layers.cpp.
void KWin::Client::setMask | ( | const QRegion & | r, | |
int | mode = X::Unsorted | |||
) |
Definition at line 556 of file client.cpp.
void KWin::Client::setMaximize | ( | bool | vertically, | |
bool | horizontally | |||
) |
Sets the maximization according to vertically and horizontally
Definition at line 2009 of file geometry.cpp.
void KWin::Client::setModal | ( | bool | modal | ) |
Definition at line 1187 of file client.cpp.
void KWin::Client::setNoBorder | ( | bool | set | ) |
Definition at line 483 of file client.cpp.
void KWin::Client::setOnAllDesktops | ( | bool | set | ) |
Definition at line 1232 of file client.cpp.
void KWin::Client::setShade | ( | ShadeMode | mode | ) |
Definition at line 713 of file client.cpp.
void KWin::Client::setShortcut | ( | const QString & | cut | ) |
Definition at line 1420 of file useractions.cpp.
void KWin::Client::setSkipPager | ( | bool | b | ) |
Definition at line 1177 of file client.cpp.
void KWin::Client::setSkipTaskbar | ( | bool | set, | |
bool | from_outside | |||
) |
Definition at line 1159 of file client.cpp.
void KWin::Client::setupCompositing | ( | ) | [virtual] |
void KWin::Client::setupWindowRules | ( | bool | ignore_temporary | ) |
double KWin::Client::shadowBrightness | ( | ShadowType | type | ) | const [inline] |
double KWin::Client::shadowOpacity | ( | ShadowType | type | ) | const [inline] |
double KWin::Client::shadowSaturation | ( | ShadowType | type | ) | const [inline] |
bool KWin::Client::shouldUnredirect | ( | ) | const [protected, virtual] |
void KWin::Client::showContextHelp | ( | ) |
Invokes context help on the window.
Only works if the window actually provides context help.
- See also:
- providesContextHelp()
Definition at line 1317 of file client.cpp.
void KWin::Client::shrinkHorizontal | ( | ) |
Definition at line 666 of file placement.cpp.
void KWin::Client::shrinkVertical | ( | ) |
Definition at line 711 of file placement.cpp.
bool KWin::Client::skipTaskbar | ( | bool | from_outside = false |
) | const [inline] |
void KWin::Client::takeActivity | ( | int | flags, | |
bool | handled, | |||
allowed_t | ||||
) |
void KWin::Client::takeFocus | ( | allowed_t | ) |
Performs the actual focusing of the window using XSetInputFocus and WM_TAKE_FOCUS.
Definition at line 1277 of file client.cpp.
void KWin::Client::toggleShade | ( | ) |
Definition at line 810 of file client.cpp.
const Client * KWin::Client::transientFor | ( | ) | const [inline] |
const ClientList & KWin::Client::transients | ( | ) | const [inline] |
void KWin::Client::unminimize | ( | bool | avoid_animation = false |
) |
Definition at line 674 of file client.cpp.
void KWin::Client::updateCaption | ( | ) |
Definition at line 1395 of file client.cpp.
void KWin::Client::updateDecoration | ( | bool | check_workspace_pos, | |
bool | force = false | |||
) |
Definition at line 301 of file client.cpp.
void KWin::Client::updateFullscreenMonitors | ( | NETFullscreenMonitors | topology | ) |
Definition at line 2331 of file geometry.cpp.
void KWin::Client::updateMouseGrab | ( | ) |
Definition at line 1079 of file events.cpp.
void KWin::Client::updateShape | ( | ) |
Definition at line 495 of file client.cpp.
void KWin::Client::updateUserTime | ( | Time | time = CurrentTime |
) |
Updates the user time (time of last action in the active window). This is called inside kwin for every action with the window that qualifies for user interaction (clicking on it, activate it externally, etc.).
Definition at line 676 of file activation.cpp.
void KWin::Client::updateVisibility | ( | ) |
Updates visibility depending on being shaded, virtual desktop, etc.
Definition at line 815 of file client.cpp.
bool KWin::Client::userCanSetFullScreen | ( | ) | const |
Definition at line 2279 of file geometry.cpp.
bool KWin::Client::userCanSetNoBorder | ( | ) | const |
Definition at line 478 of file client.cpp.
Time KWin::Client::userTime | ( | ) | const |
Definition at line 835 of file activation.cpp.
bool KWin::Client::wantsInput | ( | ) | const |
Definition at line 1623 of file client.cpp.
bool KWin::Client::wantsTabFocus | ( | ) | const |
Definition at line 1618 of file client.cpp.
bool KWin::Client::wasOriginallyGroupTransient | ( | ) | const [inline] |
bool KWin::Client::windowEvent | ( | XEvent * | e | ) |
General handler for XEvents concerning the client window
Definition at line 583 of file events.cpp.
Friends And Related Function Documentation
bool performTransiencyCheck | ( | ) | [friend] |
The documentation for this class was generated from the following files: