# class KWindowInfo

###

Module | kdeui
Namespace |
Class | KWindowInfo
Inherits |

Information about a window.

### methods

- KWindowInfo (window, properties, properties2)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  window | WId |
  properties | unsigned long |
  properties2 | unsigned long | 0

  Reads all the info about the given window.

- KWindowInfo ( )

  returns ctor

- KWindowInfo (a0)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  a0 | KWindowInfo |

- actionSupported (action)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  action | NET.Action |

  Returns true if the given action is currently supported for the window by the window manager. Requires NET.WM2AllowedActions passed to KWin.windowInfo().

- clientMachine ( )

  returns QByteArray

  Returns the client machine for the window (i.e. WM_CLIENT_MACHINE property). Requires NET.WMClientMachine passed to KWin.windowInfo().

- desktop ( )

  returns int

  Returns the virtual desktop this window is on (NET.OnAllDesktops if the window is on all desktops). You should prefer using isOnDesktop(). Requires NET.WMDesktop passed to KWin.windowInfo().

- extendedStrut ( )

  returns NETExtendedStrut

  Returns the window extended (partial) strut. Requires NET.WM2ExtendedStrut passed to KWin.windowInfo().

- frameGeometry ( )

  returns QRect

  Returns the frame geometry of the window, i.e. including the window decoration. Requires NET.WMFrameExtents passed to KWin.windowInfo().

- geometry ( )

  returns QRect

  Returns the position and size of the window contents. Requires NET.WMGeometry passed to KWin.windowInfo().

- groupLeader ( )

  returns WId

  Returns the leader window for the group the window is in, if any. Requires NET.WM2GroupLeader passed to KWin.windowInfo().

- hasState (s)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  s | unsigned long |

  Returns true if the window has the given state flag set (see the NET.State enum for details). Requires NET.WMState passed to KWin.windowInfo().

- iconName ( )

  returns QString

  Returns the name of the window that should be shown in taskbar and all other "iconic" representations of the window. Note that this has nothing to do with normal icons. Requires NET.WMIconName passed to KWin.windowInfo().

- isMinimized ( )

  returns bool

  Returns true if the window is minimized. Note that it is true only if the window is truly minimized, not shaded or on another virtual desktops, which makes it different from mappingState() == NET.Iconic or QWidget.isMinimized(). Requires NET.WMState and NET.XAWMState passed to KWin.windowInfo().

- isOnCurrentDesktop ( )

  returns bool

  Returns true if the window is on the currently active virtual desktop. Requires NET.WMDesktop passed to KWin.windowInfo().

- isOnDesktop (desktop)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  desktop | int |

  Returns true if the window is on the given virtual desktop. Requires NET.WMDesktop passed to KWin.windowInfo().

- mappingState ( )

  returns NET.MappingState

  Returns the mapping state of the window (see NET.MappingState). Note that it's very likely that you don't want to use this function, and use isOnDesktop(), isMinimized() etc. instead. Requires NET.XAWMState passed to KWin.windowInfo().

- name ( )

  returns QString

  Returns the name of the window, as specified by the application, without any modifications. You should often use visibleName() instead. Requires NET.WMName passed to KWin.windowInfo().

- onAllDesktops ( )

  returns bool

  Returns true if the window is on all desktops (equal to desktop()==NET.OnAllDesktops). Requires NET.WMDesktop passed to KWin.windowInfo().

- state ( )

  returns unsigned long

  Returns the window's state flags (see the NET.State enum for details). Requires NET.WMState passed to KWin.windowInfo().

- transientFor ( )

  returns WId

  Returns the WM_TRANSIENT_FOR property for the window, i.e. the mainwindow for this window. Requires NET.WM2TransientFor passed to KWin.windowInfo().

- valid (withdrawn_is_valid)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  withdrawn_is_valid | bool | 0

  Returns false if this window info is not valid (most probably the given window doesn't exist).

  withdrawn_is_valid - if true, windows in the withdrawn state (i.e. not managed) are also considered. This is usually not the case.

- visibleIconName ( )

  returns QString

  Returns the visible name of the window that should be shown in taskbar and all other "iconic" representations of the window. Note that this has nothing to do with normal icons. Requires NET.WMVisibleIconName passed to KWin.windowInfo().

- visibleIconNameWithState ( )

  returns QString

  Returns a visible name with state.

  This is a simple convenience function that returns the visible iconic name but with parentheses around minimized windows. Note that this has nothing to do with normal icons. Requires NET.WMVisibleIconName, NET.WMState and NET.XAWMState passed to KWin.windowInfo(). Returns the window iconic name with state

- visibleName ( )

  returns QString

  Returns the visible name of the window (i.e. including possible <2> appended when there are two or more windows with the same name). Requires NET.WMVisibleName passed to KWin.windowInfo().

- visibleNameWithState ( )

  returns QString

  Returns a visible name with state.

  This is a simple convenience function that returns the visible name but with parentheses around minimized windows. Requires NET.WMVisibleName, NET.WMState and NET.XAWMState passed to KWin.windowInfo(). Returns the window name with state

- win ( )

  returns WId

  Returns the window identifier.

- windowClassClass ( )

  returns QByteArray

  Returns the class component of the window class for the window (i.e. WM_CLASS property). Requires NET.WM2WindowClass passed to KWin.windowInfo().

- windowClassName ( )

  returns QByteArray

  Returns the name component of the window class for the window (i.e. WM_CLASS property). Requires NET.WM2WindowClass passed to KWin.windowInfo().

- windowRole ( )

  returns QByteArray

  Returns the window role for the window (i.e. WM_WINDOW_ROLE property). Requires NET.WM2WindowRole passed to KWin.windowInfo().

- windowType (supported_types)

  returns NET.WindowType

  Argument | Type | Default
  --- | --- | ---
  supported_types | int |

  Returns the window type of this window (see NET.WindowType). The argument should be all window types your application supports (see NET.WindowTypeMask). Requires NET.WMWindowType passed to KWin.windowInfo().