KWin
KWin::Client Class Reference
#include <client.h>

Detailed Description
The Client class encapsulates a window decoration frame.Definition at line 60 of file 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 | cancelShadeHover () |
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) |
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 | 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 | 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) |
void | setupWindowRules (bool ignore_temporary) |
ShadeMode | shadeMode () 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 | 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 |
Friends | |
bool | performTransiencyCheck () |
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 83 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 733 of file geometry.cpp.
QSize KWin::Client::adjustedSize | ( | ) | const |
Definition at line 1041 of file geometry.cpp.
Adjust the frame size frame according to he window's size hints.
Definition at line 1027 of file geometry.cpp.
ClientList KWin::Client::allMainClients | ( | ) | const |
Layer KWin::Client::belongsToLayer | ( | ) | const |
Definition at line 818 of file layers.cpp.
const QPoint KWin::Client::calculateGravitation | ( | bool | invert, | |
int | gravity = 0 | |||
) | const |
Definition at line 1341 of file geometry.cpp.
void KWin::Client::cancelAutoRaise | ( | ) |
Definition at line 1725 of file client.cpp.
void KWin::Client::cancelShadeHover | ( | ) |
Definition at line 815 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 383 of file client.cpp.
void KWin::Client::checkGroup | ( | Group * | gr = NULL , |
|
bool | force = false | |||
) |
void KWin::Client::checkWorkspacePosition | ( | ) |
Definition at line 883 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 1047 of file client.cpp.
void KWin::Client::debug | ( | kdbgstream & | stream | ) | const [protected, virtual] |
Definition at line 198 of file client.cpp.
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 1243 of file client.cpp.
void KWin::Client::destroyClient | ( | ) |
Definition at line 277 of file client.cpp.
Client * KWin::Client::findModal | ( | bool | allow_itself = false |
) |
void KWin::Client::gotPing | ( | Time | timestamp | ) |
Definition at line 1107 of file client.cpp.
void KWin::Client::growHorizontal | ( | ) |
Definition at line 638 of file placement.cpp.
void KWin::Client::growVertical | ( | ) |
Definition at line 683 of file placement.cpp.
bool KWin::Client::hasNETSupport | ( | ) | const [inline] |
bool KWin::Client::hasStrut | ( | ) | const |
Definition at line 839 of file geometry.cpp.
bool KWin::Client::hasTransient | ( | const Client * | c, | |
bool | indirect | |||
) | const |
void KWin::Client::hideClient | ( | bool | hide | ) |
Definition at line 630 of file client.cpp.
QRect KWin::Client::iconGeometry | ( | ) | const |
Definition at line 705 of file client.cpp.
bool KWin::Client::isCloseable | ( | ) | const |
Definition at line 1038 of file client.cpp.
bool KWin::Client::isFullScreenable | ( | bool | fullscreen_hack = false |
) | const |
Definition at line 2142 of file geometry.cpp.
bool KWin::Client::isMaximizable | ( | ) | const |
Definition at line 1638 of file geometry.cpp.
bool KWin::Client::isMinimizable | ( | ) | const |
Definition at line 641 of file client.cpp.
bool KWin::Client::isMovable | ( | ) | const |
Returns whether the window is moveable or has a fixed position.
Definition at line 1603 of file geometry.cpp.
bool KWin::Client::isResizable | ( | ) | const |
Returns whether the window is resizable or has a fixed size.
Definition at line 1619 of file geometry.cpp.
bool KWin::Client::isShadeable | ( | ) | const |
Definition at line 725 of file client.cpp.
bool KWin::Client::isShown | ( | bool | shaded_is_shown | ) | const [inline] |
bool KWin::Client::isSpecialWindow | ( | ) | const |
Definition at line 1630 of file client.cpp.
void KWin::Client::keepInArea | ( | QRect | area, | |
bool | partial = false | |||
) |
Definition at line 695 of file geometry.cpp.
void KWin::Client::keyPressEvent | ( | uint | key_code | ) |
Definition at line 1576 of file events.cpp.
void KWin::Client::killWindow | ( | ) |
Kills the window via XKill
Definition at line 1071 of file client.cpp.
Layer KWin::Client::layer | ( | ) | const |
Definition at line 811 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 47 of file manage.cpp.
QRegion KWin::Client::mask | ( | ) | const |
Definition at line 623 of file client.cpp.
void KWin::Client::maximize | ( | MaximizeMode | m | ) |
Definition at line 1883 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 1314 of file geometry.cpp.
void KWin::Client::minimize | ( | bool | avoid_animation = false |
) |
Minimizes this client plus its transients
Definition at line 672 of file client.cpp.
QSize KWin::Client::minSize | ( | ) | const |
Definition at line 1309 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 1824 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 1528 of file events.cpp.
void KWin::Client::NETMoveResizeWindow | ( | int | flags, | |
int | x, | |||
int | y, | |||
int | width, | |||
int | height | |||
) |
Definition at line 1584 of file geometry.cpp.
bool KWin::Client::noBorder | ( | ) | const |
Definition at line 484 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 751 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 | |||
) |
Definition at line 1752 of file geometry.cpp.
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 1319 of file client.cpp.
Definition at line 1479 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 206 of file client.cpp.
void KWin::Client::repaintDecoration | ( | ) |
Definition at line 412 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 | |||
) |
Definition at line 1502 of file geometry.cpp.
void KWin::Client::restackWindow | ( | Window | above, | |
int | detail, | |||
NET::RequestSource | source, | |||
Time | timestamp, | |||
bool | send_event = false | |||
) |
Definition at line 753 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 1214 of file client.cpp.
void KWin::Client::setFullScreen | ( | bool | set, | |
bool | user | |||
) |
Definition at line 2170 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 1666 of file geometry.cpp.
void KWin::Client::setKeepAbove | ( | bool | b | ) |
Definition at line 773 of file layers.cpp.
void KWin::Client::setKeepBelow | ( | bool | b | ) |
Definition at line 792 of file layers.cpp.
void KWin::Client::setMask | ( | const QRegion & | r, | |
int | mode = X::Unsorted | |||
) |
Definition at line 566 of file client.cpp.
void KWin::Client::setMaximize | ( | bool | vertically, | |
bool | horizontally | |||
) |
Sets the maximization according to vertically and horizontally
Definition at line 1891 of file geometry.cpp.
void KWin::Client::setModal | ( | bool | modal | ) |
Definition at line 1203 of file client.cpp.
void KWin::Client::setNoBorder | ( | bool | set | ) |
Definition at line 494 of file client.cpp.
void KWin::Client::setOnAllDesktops | ( | bool | set | ) |
Definition at line 1248 of file client.cpp.
void KWin::Client::setShade | ( | ShadeMode | mode | ) |
Definition at line 730 of file client.cpp.
void KWin::Client::setShortcut | ( | const QString & | cut | ) |
Definition at line 1399 of file useractions.cpp.
void KWin::Client::setSkipPager | ( | bool | b | ) |
Definition at line 1193 of file client.cpp.
void KWin::Client::setSkipTaskbar | ( | bool | set, | |
bool | from_outside | |||
) |
Definition at line 1175 of file client.cpp.
void KWin::Client::setupWindowRules | ( | bool | ignore_temporary | ) |
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 1331 of file client.cpp.
void KWin::Client::shrinkHorizontal | ( | ) |
Definition at line 664 of file placement.cpp.
void KWin::Client::shrinkVertical | ( | ) |
Definition at line 709 of file placement.cpp.
bool KWin::Client::skipTaskbar | ( | bool | from_outside = false |
) | const [inline] |
void KWin::Client::takeActivity | ( | int | flags, | |
bool | handled, | |||
allowed_t | ||||
) |
Definition at line 1260 of file client.cpp.
void KWin::Client::takeFocus | ( | allowed_t | ) |
Definition at line 1288 of file client.cpp.
void KWin::Client::toggleShade | ( | ) |
Definition at line 821 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 690 of file client.cpp.
void KWin::Client::updateCaption | ( | ) |
Definition at line 1403 of file client.cpp.
void KWin::Client::updateDecoration | ( | bool | check_workspace_pos, | |
bool | force = false | |||
) |
Definition at line 314 of file client.cpp.
void KWin::Client::updateMouseGrab | ( | ) |
Definition at line 1090 of file events.cpp.
void KWin::Client::updateShape | ( | ) |
Definition at line 506 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 | ( | ) |
Definition at line 827 of file client.cpp.
bool KWin::Client::userCanSetFullScreen | ( | ) | const |
Definition at line 2159 of file geometry.cpp.
bool KWin::Client::userCanSetNoBorder | ( | ) | const |
Definition at line 489 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 1625 of file client.cpp.
bool KWin::Client::wantsTabFocus | ( | ) | const |
Definition at line 1619 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 573 of file events.cpp.
Friends And Related Function Documentation
bool performTransiencyCheck | ( | ) | [friend] |
The documentation for this class was generated from the following files: