KDEUI
kwindowsystem_x11.cpp
Go to the documentation of this file.
167 // until that can be assumed fixed, we also react on events on the root (caused by Qts own compositing tracker)
194 if (( m[ PROTOCOLS ] & DesktopViewport ) && mapViewport() && currentDesktop() != old_current_desktop )
202 if (( m[ PROTOCOLS ] & DesktopGeometry ) && mapViewport() && numberOfDesktops() != old_number_of_desktops )
277 NETWinInfo info( QX11Info::display(), w, QX11Info::appRootWindow(), NET::WMStrut | NET::WMDesktop );
398 else if( QLatin1String( signal ) == QMetaObject::normalizedSignature(SIGNAL(windowChanged(WId,const ulong*))).constData())
400 else if( QLatin1String( signal ) == QMetaObject::normalizedSignature(SIGNAL(windowChanged(WId,uint))).constData())
402 else if( QLatin1String( signal ) == QMetaObject::normalizedSignature(SIGNAL(windowChanged(WId))).constData())
443 KWindowInfo KWindowSystem::windowInfo( WId win, unsigned long properties, unsigned long properties2 )
547 XTranslateCoordinates( QX11Info::display(), win, QX11Info::appRootWindow(), 0, 0, &x, &y, &dummy );
651 QImage img( (uchar*) ni.data, (int) ni.size.width, (int) ni.size.height, QImage::Format_ARGB32 );
678 result = QPixmap::fromImage( pm.toImage().scaled( width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) );
705 QPixmap pm = KIconLoader::global()->loadIcon( className.toLower(), KIconLoader::Small, iconWidth,
708 result = QPixmap::fromImage( pm.toImage().scaled( width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) );
725 result = QPixmap::fromImage( pm.toImage().scaled( width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) );
834 int desk = (desktop > 0 && desktop <= (int) s_d_func()->numberOfDesktops() ) ? desktop : currentDesktop();
878 NETWinInfo info( QX11Info::display(), (*it1), QX11Info::appRootWindow(), NET::WMStrut | NET::WMDesktop);
881 s_d->strutWindows.append( KWindowSystemPrivate::StrutData( *it1, info.strut(), info.desktop()));
1051 NETRootInfo info( QX11Info::display(), NET::NumberOfDesktops | NET::CurrentDesktop | NET::DesktopGeometry );
1053 && ( info.desktopGeometry( info.currentDesktop( true )).width > QApplication::desktop()->width()
1054 || info.desktopGeometry( info.currentDesktop( true )).height > QApplication::desktop()->height()))
static QString readNameProperty(WId window, unsigned long atom)
Function that reads and returns the contents of the given text property (WM_NAME, WM_ICON_NAME...
Definition: kwindowsystem_mac.cpp:602
int numberOfDesktops(bool ignore_viewport=false) const
Returns the number of desktops.
Definition: netwm.cpp:2739
QString i18n(const char *text)
Definition: netwm_def.h:194
Definition: netwm_def.h:631
Definition: netwm_def.h:623
Definition: netwm_def.h:622
static WId transientFor(WId window)
Returns the WM_TRANSIENT_FOR property for the given window, i.e.
Definition: kwindowsystem_x11.cpp:603
void compositingChanged(bool enabled)
Compositing was enabled or disabled.
Definition: netwm_def.h:620
static QString desktopName(int desktop)
Returns the name of the specified desktop.
Definition: kwindowsystem_mac.cpp:561
static KIconLoader * global()
Returns the global icon loader initialized with the global KComponentData.
Convenience access to certain properties and features of the window manager.
Definition: kwindowsystem.h:55
static void setOnDesktop(WId win, int desktop)
Moves window win to desktop desktop.
Definition: kwindowsystem_mac.cpp:406
static int viewportToDesktop(const QPoint &pos)
Definition: kwindowsystem_x11.cpp:1059
#define mask
Definition: netwm_def.h:689
void activate()
Window Managers must call this after creating the NETRootInfo object, and before using any other meth...
Definition: netwm.cpp:827
#define K_GLOBAL_STATIC(TYPE, NAME)
Definition: netwm_def.h:615
static KWindowInfo windowInfo(WId win, unsigned long properties, unsigned long properties2=0)
Returns information about window win.
Definition: kwindowsystem_mac.cpp:330
Definition: netwm_def.h:614
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
static int viewportWindowToDesktop(const QRect &r)
Definition: kwindowsystem_x11.cpp:1072
Definition: netwm.h:835
static void sendClientMessageToRoot(Window w, Atom a, long x, long y=0, long z=0)
Definition: kwindowsystem_x11.cpp:362
KAction * find(const QObject *recvr, const char *slot, QObject *parent)
Initiate a 'find' request in the current document.
Definition: kstandardaction.cpp:329
int currentDesktop(bool ignore_viewport=false) const
Returns the current desktop.
Definition: netwm.cpp:2746
static void setUserTime(WId win, long time)
Sets user timestamp time on window win.
Definition: kwindowsystem_mac.cpp:577
static void forceActiveWindow(WId win, long time=0)
Sets window win to be the active window.
Definition: kwindowsystem_mac.cpp:366
static void setType(WId win, NET::WindowType windowType)
Sets the type of window win to windowType.
Definition: kwindowsystem_mac.cpp:473
static void clearState(WId win, unsigned long state)
Clears the state of window win from state.
Definition: kwindowsystem_mac.cpp:512
virtual void connectNotify(const char *signal)
Definition: kwindowsystem_mac.cpp:616
indicates that a window should not be visible on the screen (e.g.
Definition: netwm_def.h:475
Definition: netwm_def.h:636
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)
Sets the strut of window win to to left width ranging from left_start to left_end on the left edge...
Definition: kwindowsystem_mac.cpp:583
Definition: netwm_def.h:681
static void activateWindow(WId win, long time=0)
Requests that window win is activated.
Definition: kwindowsystem_mac.cpp:355
indicates that the request comes from a normal application
Definition: netwm_def.h:718
static int currentDesktop()
Returns the current virtual desktop.
Definition: kwindowsystem_mac.cpp:384
void windowChanged(WId id, const unsigned long *properties)
The window changed.
QPixmap loadIcon(const QString &name, KIconLoader::Group group, int size=0, int state=KIconLoader::DefaultState, const QStringList &overlays=QStringList(), QString *path_store=0L, bool canReturnNull=false) const
Loads an icon.
Definition: kiconloader.cpp:1100
static void doNotManage(const QString &title)
Informs kwin via dbus to not manage a window with the specified title.
Definition: kwindowsystem_mac.cpp:609
static WId activeWindow()
Returns the currently active window, or 0 if no window is active.
Definition: kwindowsystem_mac.cpp:348
static void minimizeWindow(WId win, bool animation=true)
Iconifies a window.
Definition: kwindowsystem_mac.cpp:518
virtual void removeClient(Window window)
A Client should subclass NETRootInfo and reimplement this function when it wants to know when a windo...
Definition: netwm.h:670
static bool icccmCompliantMappingState()
Definition: kwindowsystem_mac.cpp:542
Definition: netwm_def.h:618
static void setBlockingCompositing(WId window, bool active)
Sets whether the client wishes to block compositing (for better performance)
Definition: kwindowsystem_mac.cpp:627
Definition: netwm_def.h:638
Definition: netwm_def.h:646
static void setStrut(WId win, int left, int right, int top, int bottom)
Convenience function for setExtendedStrut() that automatically makes struts as wide/high as the scree...
Definition: kwindowsystem_mac.cpp:591
load icon after getting name from the classhint
Definition: kwindowsystem.h:270
read from property from the window manager specification
Definition: kwindowsystem.h:268
static void unminimizeWindow(WId win, bool animation=true)
DeIconifies a window.
Definition: kwindowsystem_mac.cpp:524
static QPoint desktopToViewport(int desktop, bool absolute)
Definition: kwindowsystem_x11.cpp:1089
static QPoint constrainViewportRelativePosition(const QPoint &pos)
Definition: kwindowsystem_x11.cpp:1116
bool isSupported(NET::Property property) const
Returns true if the given property is supported by the window manager.
Definition: netwm.cpp:2640
static void setCurrentDesktop(int desktop)
Convenience function to set the current desktop to desktop.
Definition: kwindowsystem_mac.cpp:394
static QRect workArea(int desktop=-1)
Returns the workarea for the specified desktop, or the current work area if no desktop has been speci...
Definition: kwindowsystem_mac.cpp:547
static void setState(WId win, unsigned long state)
Sets the state of window win to state.
Definition: kwindowsystem_mac.cpp:506
void showingDesktopChanged(bool showing)
The state of showing the desktop has changed.
static void setIcons(WId win, const QPixmap &icon, const QPixmap &miniIcon)
Sets an icon and a miniIcon on window win.
Definition: kwindowsystem_mac.cpp:467
NETSize desktopGeometry(int desktop) const
Returns the desktop geometry size.
Definition: netwm.cpp:2680
static KWindowSystem * self()
Access to the singleton instance.
Definition: kwindowsystem_mac.cpp:308
static void setMainWindow(QWidget *subwindow, WId mainwindow)
Sets the parent window of subwindow to be mainwindow.
Definition: kwindowsystem_mac.cpp:412
static void allowExternalProcessWindowActivation(int pid=-1)
Allows a window from another process to raise and activate itself.
Definition: kwindowsystem_mac.cpp:622
static const QList< WId > & windows()
Returns the list of all toplevel windows currently managed by the window manager in the order of crea...
Definition: kwindowsystem_mac.cpp:318
indicated that the request comes from pager or similar tool
Definition: netwm_def.h:722
void currentDesktopChanged(int desktop)
Switched to another virtual desktop.
static bool hasWId(WId id)
Test to see if id still managed at present.
Definition: kwindowsystem_mac.cpp:324
there was an attempt to activate this window, but the window manager prevented this.
Definition: netwm_def.h:490
static bool showingDesktop()
Returns the state of showing the desktop.
Definition: kwindowsystem_mac.cpp:572
void stackingOrderChanged()
Emitted when the stacking order of the window changed.
static void demandAttention(WId win, bool set=true)
When application finishes some operation and wants to notify the user about it, it can call demandAtt...
Definition: kwindowsystem_mac.cpp:373
static const int OnAllDesktops
Sentinel value to indicate that the client wishes to be visible on all desktops.
Definition: netwm.h:1335
static void setOnAllDesktops(WId win, bool b)
Sets window win to be present on all virtual desktops if is true.
Definition: kwindowsystem_mac.cpp:400
static int numberOfDesktops()
Returns the number of virtual desktops.
Definition: kwindowsystem_mac.cpp:389
Definition: netwm.h:835
virtual void addClient(Window window)
A Client should subclass NETRootInfo and reimplement this function when it wants to know when a windo...
Definition: netwm.h:662
void numberOfDesktopsChanged(int num)
The number of desktops changed.
static void create_atoms(Display *dpy=QX11Info::display())
Definition: kwindowsystem_x11.cpp:331
static bool allowedActionsSupported()
Returns true if the WM announces which actions it allows for windows.
Definition: kwindowsystem_mac.cpp:597
static bool compositingActive()
Returns true if a compositing manager is running (i.e.
Definition: kwindowsystem_mac.cpp:379
void installEventFilter(QWidget *filter)
Installs a widget filter as a global X11 event filter.
Definition: ksystemeventfilter.cpp:146
static QPixmap icon(WId win, int width=-1, int height=-1, bool scale=false)
Returns an icon for window win.
Definition: kwindowsystem_mac.cpp:418
Definition: netwm_def.h:619
Definition: netwm_def.h:621
void event(XEvent *event, unsigned long *properties, int properties_size)
This function takes the passed XEvent and returns an OR'ed list of NETRootInfo properties that have c...
Definition: netwm.cpp:1858
void strutChanged()
Something changed with the struts, may or may not have changed the work area.
static WId groupLeader(WId window)
Returns the leader window for the group the given window is in, if any.
Definition: kwindowsystem_x11.cpp:622
Definition: netwm_def.h:616
void activeWindowChanged(WId id)
Hint that is active (= has focus) now.
Definition: netwm_def.h:617
static QList< WId > stackingOrder()
Returns the list of all toplevel windows currently managed by the window manager in the current stack...
Definition: kwindowsystem_mac.cpp:340
Definition: netwm_def.h:633
QPixmap createPixmapFromHandle(WId pixmap, WId pixmap_mask)
Creates a QPixmap that contains a copy of the pixmap given by the X handle pixmap and optionally also...
Definition: kxutils.cpp:39
Definition: netwm_def.h:635
Definition: netwm_def.h:704
static void setDesktopName(int desktop, const QString &name)
Sets the name of the specified desktop.
Definition: kwindowsystem_mac.cpp:566
Definition: netwm_def.h:648
Definition: netwm_def.h:680
indicates that the Window Manager SHOULD keep the window's position fixed on the screen, even when the virtual desktop scrolls.
Definition: netwm_def.h:437
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:16 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:16 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.