• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Public Types | Signals | Static Public Member Functions | Protected Member Functions | List of all members
KWindowSystem Class Reference

#include <kwindowsystem.h>

Inheritance diagram for KWindowSystem:
Inheritance graph
[legend]

Public Types

enum  IconSource { NETWM = 1, WMHints = 2, ClassHint = 4, XApp = 8 }
 
- Public Types inherited from NET
enum  { OnAllDesktops = -1 }
 
enum  Action {
  ActionMove = 1<<0, ActionResize = 1<<1, ActionMinimize = 1<<2, ActionShade = 1<<3,
  ActionStick = 1<<4, ActionMaxVert = 1<<5, ActionMaxHoriz = 1<<6, ActionMax = ActionMaxVert | ActionMaxHoriz,
  ActionFullScreen = 1<<7, ActionChangeDesktop = 1<<8, ActionClose = 1<<9
}
 
enum  DesktopLayoutCorner { DesktopLayoutCornerTopLeft = 0, DesktopLayoutCornerTopRight = 1, DesktopLayoutCornerBottomLeft = 2, DesktopLayoutCornerBottomRight = 3 }
 
enum  Direction {
  TopLeft = 0, Top = 1, TopRight = 2, Right = 3,
  BottomRight = 4, Bottom = 5, BottomLeft = 6, Left = 7,
  Move = 8, KeyboardSize = 9, KeyboardMove = 10, MoveResizeCancel = 11
}
 
enum  MappingState { Visible = 1, Withdrawn = 0, Iconic = 3 }
 
enum  Orientation { OrientationHorizontal = 0, OrientationVertical = 1 }
 
enum  Property {
  Supported = 1<<0, ClientList = 1<<1, ClientListStacking = 1<<2, NumberOfDesktops = 1<<3,
  DesktopGeometry = 1<<4, DesktopViewport = 1<<5, CurrentDesktop = 1<<6, DesktopNames = 1<<7,
  ActiveWindow = 1<<8, WorkArea = 1<<9, SupportingWMCheck = 1<<10, VirtualRoots = 1<<11,
  CloseWindow = 1<<13, WMMoveResize = 1<<14, WMName = 1<<15, WMVisibleName = 1<<16,
  WMDesktop = 1<<17, WMWindowType = 1<<18, WMState = 1<<19, WMStrut = 1<<20,
  WMIconGeometry = 1<<21, WMIcon = 1<<22, WMPid = 1<<23, WMHandledIcons = 1<<24,
  WMPing = 1<<25, XAWMState = 1<<27, WMFrameExtents = 1<<28, WMIconName = 1<<29,
  WMVisibleIconName = 1<<30, WMGeometry = 1<<31
}
 
enum  Property2 {
  WM2UserTime = 1<<0, WM2StartupId = 1<<1, WM2TransientFor = 1<<2, WM2GroupLeader = 1<<3,
  WM2AllowedActions = 1<<4, WM2RestackWindow = 1<<5, WM2MoveResizeWindow = 1<<6, WM2ExtendedStrut = 1<<7,
  WM2TakeActivity = 1<<8, WM2KDETemporaryRules = 1<<9, WM2WindowClass = 1<<10, WM2WindowRole = 1<<11,
  WM2ClientMachine = 1<<12, WM2ShowingDesktop = 1<<13, WM2Opacity = 1<<14, WM2DesktopLayout = 1<<15,
  WM2FullPlacement = 1<<16, WM2FullscreenMonitors = 1<<17, WM2FrameOverlap = 1<<18, WM2Activities = 1<<19,
  WM2BlockCompositing = 1<<20, WM2KDEShadow = 1<<21
}
 
enum  RequestSource { FromUnknown = 0, FromApplication = 1, FromTool = 2 }
 
enum  Role { Client, WindowManager }
 
enum  State {
  Modal = 1<<0, Sticky = 1<<1, MaxVert = 1<<2, MaxHoriz = 1<<3,
  Max = MaxVert | MaxHoriz, Shaded = 1<<4, SkipTaskbar = 1<<5, KeepAbove = 1<<6,
  StaysOnTop = KeepAbove, SkipPager = 1<<7, Hidden = 1<<8, FullScreen = 1<<9,
  KeepBelow = 1<<10, DemandsAttention = 1<<11
}
 
enum  WindowType {
  Unknown = -1, Normal = 0, Desktop = 1, Dock = 2,
  Toolbar = 3, Menu = 4, Dialog = 5, Override = 6,
  TopMenu = 7, Utility = 8, Splash = 9, DropdownMenu = 10,
  PopupMenu = 11, Tooltip = 12, Notification = 13, ComboBox = 14,
  DNDIcon = 15
}
 
enum  WindowTypeMask {
  NormalMask = 1<<0, DesktopMask = 1<<1, DockMask = 1<<2, ToolbarMask = 1<<3,
  MenuMask = 1<<4, DialogMask = 1<<5, OverrideMask = 1<<6, TopMenuMask = 1<<7,
  UtilityMask = 1<<8, SplashMask = 1<<9, DropdownMenuMask = 1<<10, PopupMenuMask = 1<<11,
  TooltipMask = 1<<12, NotificationMask = 1<<13, ComboBoxMask = 1<<14, DNDIconMask = 1<<15,
  AllTypesMask = 0LU-1
}
 

Signals

void activeWindowChanged (WId id)
 
void compositingChanged (bool enabled)
 
void currentDesktopChanged (int desktop)
 
void desktopNamesChanged ()
 
void numberOfDesktopsChanged (int num)
 
void showingDesktopChanged (bool showing)
 
void stackingOrderChanged ()
 
void strutChanged ()
 
void windowAdded (WId id)
 
void windowChanged (WId id, const unsigned long *properties)
 
void windowChanged (WId id, unsigned int properties)
 
void windowChanged (WId id)
 
void windowRemoved (WId id)
 
void workAreaChanged ()
 

Static Public Member Functions

static void activateWindow (WId win, long time=0)
 
static WId activeWindow ()
 
static bool allowedActionsSupported ()
 
static void allowExternalProcessWindowActivation (int pid=-1)
 
static void clearState (WId win, unsigned long state)
 
static bool compositingActive ()
 
static QPoint constrainViewportRelativePosition (const QPoint &pos)
 
static int currentDesktop ()
 
static void demandAttention (WId win, bool set=true)
 
static QString desktopName (int desktop)
 
static QPoint desktopToViewport (int desktop, bool absolute)
 
static void doNotManage (const QString &title)
 
static void forceActiveWindow (WId win, long time=0)
 
static WId groupLeader (WId window)
 
static bool hasWId (WId id)
 
static bool icccmCompliantMappingState ()
 
static QPixmap icon (WId win, int width=-1, int height=-1, bool scale=false)
 
static QPixmap icon (WId win, int width, int height, bool scale, int flags)
 
static void lowerWindow (WId win)
 
static bool mapViewport ()
 
static void minimizeWindow (WId win, bool animation=true)
 
static int numberOfDesktops ()
 
static void raiseWindow (WId win)
 
static QString readNameProperty (WId window, unsigned long atom)
 
static KWindowSystem * self ()
 
static void setBlockingCompositing (WId window, bool active)
 
static void setCurrentDesktop (int desktop)
 
static void setDesktopName (int desktop, const QString &name)
 
static void setExtendedStrut (WId win, int left_width, int left_start, int left_end, int right_width, int right_start, int right_end, int top_width, int top_start, int top_end, int bottom_width, int bottom_start, int bottom_end)
 
static void setIcons (WId win, const QPixmap &icon, const QPixmap &miniIcon)
 
static void setMainWindow (QWidget *subwindow, WId mainwindow)
 
static void setOnAllDesktops (WId win, bool b)
 
static void setOnDesktop (WId win, int desktop)
 
static void setState (WId win, unsigned long state)
 
static void setStrut (WId win, int left, int right, int top, int bottom)
 
static void setType (WId win, NET::WindowType windowType)
 
static void setUserTime (WId win, long time)
 
static bool showingDesktop ()
 
static QList< WId > stackingOrder ()
 
static WId transientFor (WId window)
 
static void unminimizeWindow (WId win, bool animation=true)
 
static int viewportToDesktop (const QPoint &pos)
 
static int viewportWindowToDesktop (const QRect &r)
 
static KWindowInfo windowInfo (WId win, unsigned long properties, unsigned long properties2=0)
 
static const QList< WId > & windows ()
 
static QRect workArea (int desktop=-1)
 
static QRect workArea (const QList< WId > &excludes, int desktop=-1)
 
- Static Public Member Functions inherited from NET
static int timestampCompare (unsigned long time1, unsigned long time2)
 
static int timestampDiff (unsigned long time1, unsigned long time2)
 
static bool typeMatchesMask (WindowType type, unsigned long mask)
 

Protected Member Functions

virtual void connectNotify (const char *signal)
 

Detailed Description

Convenience access to certain properties and features of the window manager.

The class KWindowSystem provides information about the state of the window manager and allows asking the window manager to change them using a more high-level interface than the NETWinInfo/NETRootInfo lowlevel classes.

Because of limitiations of the way Qt is implemented on Mac OSX, the WId's returned by methods in this class are not compatible with those expected by other Qt methods. So while it should be fine to pass WId's retrieved by for example calling the winId method on a QWidget to methods in this class the reverse is not true. You should never pass a WId obtained from this class to a Qt method accepting a WId parameter.

Class for interaction with the window manager.

Author
Matthias Ettrich (ettri.nosp@m.ch@k.nosp@m.de.or.nosp@m.g)

Definition at line 55 of file kwindowsystem.h.

Member Enumeration Documentation

enum KWindowSystem::IconSource

Masks specifying from which sources to read an icon.

They are tried from the best until an icon is found.

  • NETWM from property from the window manager specification
  • WMHints from WMHints property
  • ClassHint load icon after getting name from the classhint
  • XApp load the standard X icon (last fallback)
Enumerator
NETWM 

read from property from the window manager specification

WMHints 

read from WMHints property

ClassHint 

load icon after getting name from the classhint

XApp 

load the standard X icon (last fallback)

Definition at line 268 of file kwindowsystem.h.

Member Function Documentation

void KWindowSystem::activateWindow ( WId  win,
long  time = 0 
)
static

Requests that window win is activated.

There are two ways how to activate a window, by calling activateWindow() and forceActiveWindow(). Generally, applications shouldn't make attempts to explicitly activate their windows, and instead let the user to activate them. In the special cases where this may be needed, applications should use activateWindow(). Window manager may consider whether this request wouldn't result in focus stealing, which would be obtrusive, and may refuse the request.

The usage of forceActiveWindow() is meant only for pagers and similar tools, which represent direct user actions related to window manipulation. Except for rare cases, this request will be always honored, and normal applications are forbidden to use it.

In case of problems, consult the KWin README in the kdebase package (kdebase/kwin/README), or ask on the kwin@.nosp@m.kde..nosp@m.org mailing list.

Parameters
winthe id of the window to make active
timeX server timestamp of the user activity that caused this request

Definition at line 355 of file kwindowsystem_mac.cpp.

WId KWindowSystem::activeWindow ( )
static

Returns the currently active window, or 0 if no window is active.

Returns
the window id of the active window, or 0 if no window is active

Definition at line 348 of file kwindowsystem_mac.cpp.

void KWindowSystem::activeWindowChanged ( WId  id)
signal

Hint that <Window> is active (= has focus) now.

Parameters
idthe id of the window that is active
bool KWindowSystem::allowedActionsSupported ( )
static

Returns true if the WM announces which actions it allows for windows.

Definition at line 597 of file kwindowsystem_mac.cpp.

void KWindowSystem::allowExternalProcessWindowActivation ( int  pid = -1)
static

Allows a window from another process to raise and activate itself.

Depending on the window manager, the grant may only be temporary, or for a single activation, and it may require the current process to be the "foreground" one" (ie. the process with the input focus).

You should call this function before executing actions that may trigger the showing of a window or dialog in another process, e.g. a dbus signal or function call, or any other inter-process notification mechanism.

This is mostly used on Windows, where windows are not allowed to be raised and activated if their process is not the foreground one, but it may also apply to other window managers.

Parameters
pidif specified, the grant only applies to windows belonging to the specific process. By default, a value of -1 means all processes.

Definition at line 622 of file kwindowsystem_mac.cpp.

void KWindowSystem::clearState ( WId  win,
unsigned long  state 
)
static

Clears the state of window win from state.

Possible values are or'ed combinations of NET::Modal, NET::Sticky, NET::MaxVert, NET::MaxHoriz, NET::Shaded, NET::SkipTaskbar, NET::SkipPager, NET::Hidden, NET::FullScreen, NET::KeepAbove, NET::KeepBelow, NET::StaysOnTop

Parameters
winthe id of the window
statethe flags that will be cleared

Definition at line 512 of file kwindowsystem_mac.cpp.

bool KWindowSystem::compositingActive ( )
static

Returns true if a compositing manager is running (i.e.

ARGB windows are supported, effects will be provided, etc.).

Definition at line 379 of file kwindowsystem_mac.cpp.

void KWindowSystem::compositingChanged ( bool  enabled)
signal

Compositing was enabled or disabled.

Note that this signal may be emitted before any compositing plugins have been initialized in the window manager.

If you need to check if a specific compositing plugin such as the blur effect is enabled, you should track that separately rather than test for it in a slot connected to this signal.

Since
4.7.1
void KWindowSystem::connectNotify ( const char *  signal)
protectedvirtual

Definition at line 616 of file kwindowsystem_mac.cpp.

QPoint KWindowSystem::constrainViewportRelativePosition ( const QPoint &  pos)
static
Since
4.0.1 Checks the relative difference used to move a window will still be inside valid desktop area.

Definition at line 1116 of file kwindowsystem_x11.cpp.

int KWindowSystem::currentDesktop ( )
static

Returns the current virtual desktop.

Returns
the current virtual desktop

Definition at line 384 of file kwindowsystem_mac.cpp.

void KWindowSystem::currentDesktopChanged ( int  desktop)
signal

Switched to another virtual desktop.

Parameters
desktopthe number of the new desktop
void KWindowSystem::demandAttention ( WId  win,
bool  set = true 
)
static

When application finishes some operation and wants to notify the user about it, it can call demandAttention().

Instead of activating the window, which could be obtrusive, the window will be marked specially as demanding user's attention. See also explanation in description of activateWindow().

Note that it's usually better to use KNotifyClient.

Definition at line 373 of file kwindowsystem_mac.cpp.

QString KWindowSystem::desktopName ( int  desktop)
static

Returns the name of the specified desktop.

Parameters
desktopthe number of the desktop
Returns
the name of the desktop

Definition at line 561 of file kwindowsystem_mac.cpp.

void KWindowSystem::desktopNamesChanged ( )
signal

Desktops have been renamed.

QPoint KWindowSystem::desktopToViewport ( int  desktop,
bool  absolute 
)
static

Returns topleft corner of the viewport area for the given mapped virtual desktop.

Definition at line 1089 of file kwindowsystem_x11.cpp.

void KWindowSystem::doNotManage ( const QString &  title)
static

Informs kwin via dbus to not manage a window with the specified title.

Useful for swallowing legacy applications, for example java applets.

Parameters
titlethe title of the window

Definition at line 609 of file kwindowsystem_mac.cpp.

void KWindowSystem::forceActiveWindow ( WId  win,
long  time = 0 
)
static

Sets window win to be the active window.

Note that this should be called only in special cases, applications shouldn't force themselves or other windows to be the active window. Generally, this call should used only by pagers and similar tools. See the explanation in description of activateWindow().

Parameters
winthe id of the window to make active
timeX server timestamp of the user activity that caused this request

Definition at line 366 of file kwindowsystem_mac.cpp.

WId KWindowSystem::groupLeader ( WId  window)
static

Returns the leader window for the group the given window is in, if any.

Parameters
windowthe id of the window

Definition at line 622 of file kwindowsystem_x11.cpp.

bool KWindowSystem::hasWId ( WId  id)
static

Test to see if id still managed at present.

Parameters
idthe window id to test
Returns
true if the window id is still managed

Definition at line 324 of file kwindowsystem_mac.cpp.

bool KWindowSystem::icccmCompliantMappingState ( )
static

Returns true if the WM uses IconicState also for windows on inactive virtual desktops.

Definition at line 542 of file kwindowsystem_mac.cpp.

QPixmap KWindowSystem::icon ( WId  win,
int  width = -1,
int  height = -1,
bool  scale = false 
)
static

Returns an icon for window win.

If width and height are specified, the best icon for the requested size is returned.

If scale is true, the icon is smooth-scaled to have exactly the requested size.

Parameters
winthe id of the window
widththe desired width, or -1
heightthe desired height, or -1
scaleif true the icon will be scaled to the desired size. Otherwise the icon will not be modified.
Returns
the icon of the window

Definition at line 418 of file kwindowsystem_mac.cpp.

QPixmap KWindowSystem::icon ( WId  win,
int  width,
int  height,
bool  scale,
int  flags 
)
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Overloaded variant that allows specifying from which sources the icon should be read.

You should usually prefer the simpler variant which tries all possibilities to get an icon.

Parameters
winthe id of the window
widththe desired width, or -1
heightthe desired height, or -1
scaleif true the icon will be scaled to the desired size. Otherwise the icon will not be modified.
flagsOR-ed flags from the IconSource enum

Definition at line 461 of file kwindowsystem_mac.cpp.

void KWindowSystem::lowerWindow ( WId  win)
static

Lowers the given window.

This call is only for pagers and similar tools that represent direct user actions. Applications should not use it, they should keep using QWidget::lower() or XLowerWindow() if necessary.

Definition at line 536 of file kwindowsystem_mac.cpp.

bool KWindowSystem::mapViewport ( )
static

Returns true if viewports are mapped to virtual desktops.

Definition at line 1042 of file kwindowsystem_x11.cpp.

void KWindowSystem::minimizeWindow ( WId  win,
bool  animation = true 
)
static

Iconifies a window.

Compatible to XIconifyWindow but has an additional parameter animation.

Parameters
winthe id of the window
animationtrue to show an animation
See also
deIconifyWindow()

Definition at line 518 of file kwindowsystem_mac.cpp.

int KWindowSystem::numberOfDesktops ( )
static

Returns the number of virtual desktops.

Returns
the number of virtual desktops

Definition at line 389 of file kwindowsystem_mac.cpp.

void KWindowSystem::numberOfDesktopsChanged ( int  num)
signal

The number of desktops changed.

Parameters
numthe new number of desktops
void KWindowSystem::raiseWindow ( WId  win)
static

Raises the given window.

This call is only for pagers and similar tools that represent direct user actions. Applications should not use it, they should keep using QWidget::raise() or XRaiseWindow() if necessary.

Definition at line 530 of file kwindowsystem_mac.cpp.

QString KWindowSystem::readNameProperty ( WId  window,
unsigned long  atom 
)
static

Function that reads and returns the contents of the given text property (WM_NAME, WM_ICON_NAME,...).

Definition at line 602 of file kwindowsystem_mac.cpp.

KWindowSystem * KWindowSystem::self ( )
static

Access to the singleton instance.

Useful mainly for connecting to signals.

Definition at line 308 of file kwindowsystem_mac.cpp.

void KWindowSystem::setBlockingCompositing ( WId  window,
bool  active 
)
static

Sets whether the client wishes to block compositing (for better performance)

Since
4.7

Definition at line 627 of file kwindowsystem_mac.cpp.

void KWindowSystem::setCurrentDesktop ( int  desktop)
static

Convenience function to set the current desktop to desktop.

See NETRootInfo.

Parameters
desktopthe number of the new desktop

Definition at line 394 of file kwindowsystem_mac.cpp.

void KWindowSystem::setDesktopName ( int  desktop,
const QString &  name 
)
static

Sets the name of the specified desktop.

Parameters
desktopthe number of the desktop
namethe new name for the desktop

Definition at line 566 of file kwindowsystem_mac.cpp.

void KWindowSystem::setExtendedStrut ( WId  win,
int  left_width,
int  left_start,
int  left_end,
int  right_width,
int  right_start,
int  right_end,
int  top_width,
int  top_start,
int  top_end,
int  bottom_width,
int  bottom_start,
int  bottom_end 
)
static

Sets the strut of window win to to left width ranging from left_start to left_end on the left edge, and simiarly for the other edges.

For not reserving a strut, pass 0 as the width. E.g. to reserve 10x10 square in the topleft corner, use e.g. setExtendedStrut( w, 10, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0 ).

Parameters
winthe id of the window
left_widthwidth of the strut at the left edge
left_startstarting y coordinate of the strut at the left edge
left_endending y coordinate of the strut at the left edge
right_widthwidth of the strut at the right edge
right_startstarting y coordinate of the strut at the right edge
right_endending y coordinate of the strut at the right edge
top_widthwidth of the strut at the top edge
top_startstarting x coordinate of the strut at the top edge
top_endending x coordinate of the strut at the top edge
bottom_widthwidth of the strut at the bottom edge
bottom_startstarting x coordinate of the strut at the bottom edge
bottom_endending x coordinate of the strut at the bottom edge

Definition at line 583 of file kwindowsystem_mac.cpp.

void KWindowSystem::setIcons ( WId  win,
const QPixmap &  icon,
const QPixmap &  miniIcon 
)
static

Sets an icon and a miniIcon on window win.

Parameters
winthe id of the window
iconthe new icon
miniIconthe new mini icon

Definition at line 467 of file kwindowsystem_mac.cpp.

void KWindowSystem::setMainWindow ( QWidget *  subwindow,
WId  mainwindow 
)
static

Sets the parent window of subwindow to be mainwindow.

This overrides the parent set the usual way as the QWidget parent, but only for the window manager - e.g. stacking order and window grouping will be affected, but features like automatic deletion of children when the parent is deleted are unaffected and normally use the QWidget parent.

This function should be used before a dialog is shown for a window that belongs to another application.

Definition at line 412 of file kwindowsystem_mac.cpp.

void KWindowSystem::setOnAllDesktops ( WId  win,
bool  b 
)
static

Sets window win to be present on all virtual desktops if is true.

Otherwise the window lives only on one single desktop.

Parameters
winthe id of the window
btrue to show the window on all desktops, false otherwise

Definition at line 400 of file kwindowsystem_mac.cpp.

void KWindowSystem::setOnDesktop ( WId  win,
int  desktop 
)
static

Moves window win to desktop desktop.

Parameters
winthe id of the window
desktopthe number of the new desktop

Definition at line 406 of file kwindowsystem_mac.cpp.

void KWindowSystem::setState ( WId  win,
unsigned long  state 
)
static

Sets the state of window win to state.

Possible values are or'ed combinations of NET::Modal, NET::Sticky, NET::MaxVert, NET::MaxHoriz, NET::Shaded, NET::SkipTaskbar, NET::SkipPager, NET::Hidden, NET::FullScreen, NET::KeepAbove, NET::KeepBelow, NET::StaysOnTop

Parameters
winthe id of the window
statethe new flags that will be set

Definition at line 506 of file kwindowsystem_mac.cpp.

void KWindowSystem::setStrut ( WId  win,
int  left,
int  right,
int  top,
int  bottom 
)
static

Convenience function for setExtendedStrut() that automatically makes struts as wide/high as the screen width/height.

Sets the strut of window win to left, right, top, bottom.

Parameters
winthe id of the window
leftthe left strut
rightthe right strut
topthe top strut
bottomthe bottom strut

Definition at line 591 of file kwindowsystem_mac.cpp.

void KWindowSystem::setType ( WId  win,
NET::WindowType  windowType 
)
static

Sets the type of window win to windowType.

Parameters
winthe id of the window
windowTypethe type of the window (see NET::WindowType)

Definition at line 473 of file kwindowsystem_mac.cpp.

void KWindowSystem::setUserTime ( WId  win,
long  time 
)
static

Sets user timestamp time on window win.

The timestamp is expressed as XServer time. If a window is shown with user timestamp older than the time of the last user action, it won't be activated after being shown. The most common case is the special value 0 which means not to activate the window after being shown.

Definition at line 577 of file kwindowsystem_mac.cpp.

bool KWindowSystem::showingDesktop ( )
static

Returns the state of showing the desktop.

Definition at line 572 of file kwindowsystem_mac.cpp.

void KWindowSystem::showingDesktopChanged ( bool  showing)
signal

The state of showing the desktop has changed.

QList< WId > KWindowSystem::stackingOrder ( )
static

Returns the list of all toplevel windows currently managed by the window manager in the current stacking order (from lower to higher).

May be useful for pagers.

Returns
the list of all toplevel windows in stacking order

Definition at line 340 of file kwindowsystem_mac.cpp.

void KWindowSystem::stackingOrderChanged ( )
signal

Emitted when the stacking order of the window changed.

The new order can be obtained with stackingOrder().

void KWindowSystem::strutChanged ( )
signal

Something changed with the struts, may or may not have changed the work area.

Usually just using the workAreaChanged() signal is sufficient.

WId KWindowSystem::transientFor ( WId  window)
static

Returns the WM_TRANSIENT_FOR property for the given window, i.e.

the mainwindow for this window.

Parameters
windowthe id of the window

Definition at line 603 of file kwindowsystem_x11.cpp.

void KWindowSystem::unminimizeWindow ( WId  win,
bool  animation = true 
)
static

DeIconifies a window.

Compatible to XMapWindow but has an additional parameter animation.

Parameters
winthe id of the window
animationtrue to show an animation
See also
iconifyWindow()

Definition at line 524 of file kwindowsystem_mac.cpp.

int KWindowSystem::viewportToDesktop ( const QPoint &  pos)
static

Returns mapped virtual desktop for the given position in the viewport.

Definition at line 1059 of file kwindowsystem_x11.cpp.

int KWindowSystem::viewportWindowToDesktop ( const QRect &  r)
static

Returns mapped virtual desktop for the given window geometry.

Definition at line 1072 of file kwindowsystem_x11.cpp.

void KWindowSystem::windowAdded ( WId  id)
signal

A window has been added.

Parameters
idthe id of the window
void KWindowSystem::windowChanged ( WId  id,
const unsigned long *  properties 
)
signal

The window changed.

The properties parameter contains the NET properties that were modified (see netwm_def.h). First element are NET::Property values, second element are NET::Property2 values (i.e. the format is the same like for the NETWinInfo class constructor).

Parameters
idthe id of the window
propertiesthe properties that were modified
void KWindowSystem::windowChanged ( WId  id,
unsigned int  properties 
)
signal
Deprecated:
The window changed.

The unsigned int parameter contains the NET properties that were modified (see netwm_def.h).

Parameters
idthe id of the window
propertiesthe properties that were modified
void KWindowSystem::windowChanged ( WId  id)
signal

The window changed somehow.

Parameters
idthe id of the window
KWindowInfo KWindowSystem::windowInfo ( WId  win,
unsigned long  properties,
unsigned long  properties2 = 0 
)
static

Returns information about window win.

It is recommended to check whether the returned info is valid by calling the valid() method.

Parameters
winthe id of the window
propertiesall properties that should be retrieved (see NET::Property enum for details). Unlisted properties cause related information to be invalid in the returned data, but make this function faster when not all data is needed.
properties2additional properties (see NET::Property2 enum)
Returns
the window information

Definition at line 330 of file kwindowsystem_mac.cpp.

void KWindowSystem::windowRemoved ( WId  id)
signal

A window has been removed.

Parameters
idthe id of the window that has been removed
const QList< WId > & KWindowSystem::windows ( )
static

Returns the list of all toplevel windows currently managed by the window manager in the order of creation.

Please do not rely on indexes of this list: Whenever you enter Qt's event loop in your application, it may happen that entries are removed or added. Your module should perhaps work on a copy of this list and verify a window with hasWId() before any operations.

Iteration over this list can be done easily with

QList<WId>::ConstIterator it;
for ( it = KWindowSystem::windows().begin();
it != KWindowSystem::windows().end(); ++it ) {
... do something here, (*it) is the current WId.
}
Returns
the list of all toplevel windows

Definition at line 318 of file kwindowsystem_mac.cpp.

QRect KWindowSystem::workArea ( int  desktop = - 1)
static

Returns the workarea for the specified desktop, or the current work area if no desktop has been specified.

Parameters
desktopthe number of the desktop to check, -1 for the current desktop
Returns
the size and position of the desktop

Definition at line 547 of file kwindowsystem_mac.cpp.

QRect KWindowSystem::workArea ( const QList< WId > &  excludes,
int  desktop = -1 
)
static

Returns the workarea for the specified desktop, or the current work area if no desktop has been specified.

Excludes struts of clients in the exclude List.

Parameters
excludesthe list of clients whose struts will be excluded
desktopthe number of the desktop to check, -1 for the current desktop
Returns
the size and position of the desktop

Definition at line 554 of file kwindowsystem_mac.cpp.

void KWindowSystem::workAreaChanged ( )
signal

The workarea has changed.


The documentation for this class was generated from the following files:
  • kwindowsystem.h
  • kwindowsystem_mac.cpp
  • kwindowsystem_qws.cpp
  • kwindowsystem_win.cpp
  • kwindowsystem_x11.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal