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
const char * className() const
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
void setBottom(int y)
QImage convertToFormat(Format format, QFlags< Qt::ImageConversionFlag > flags) const
Definition: netwm_def.h:631
Definition: netwm_def.h:623
Definition: netwm_def.h:622
int width() const
static WId transientFor(WId window)
Returns the WM_TRANSIENT_FOR property for the given window, i.e.
Definition: kwindowsystem_x11.cpp:603
QByteArray normalizedSignature(const char *method)
int width() const
void compositingChanged(bool enabled)
Compositing was enabled or disabled.
Definition: netwm_def.h:620
int right() const
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
Qt::HANDLE appRootWindow(int screen)
#define mask
Definition: netwm_def.h:689
Display * display()
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
int screen() const
bool isNull() const
Definition: netwm_def.h:614
static int viewportWindowToDesktop(const QRect &r)
Definition: kwindowsystem_x11.cpp:1072
void setAttribute(Qt::WidgetAttribute attribute, bool on)
Definition: netwm.h:835
QPixmap fromImage(const QImage &image, QFlags< Qt::ImageConversionFlag > flags)
QDBusConnection sessionBus()
static void sendClientMessageToRoot(Window w, Atom a, long x, long y=0, long z=0)
Definition: kwindowsystem_x11.cpp:362
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
virtual bool x11Event(XEvent *event)
bool isNull() const
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
QDBusMessage call(const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
int x() const
int y() const
geometry
indicates that a window should not be visible on the screen (e.g.
Definition: netwm_def.h:475
Definition: netwm_def.h:636
unsigned long appTime()
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
width
Definition: netwm_def.h:681
static void activateWindow(WId win, long time=0)
Requests that window win is activated.
Definition: kwindowsystem_mac.cpp:355
const char * name() const
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
QString fromLocal8Bit(const char *str, int size)
static WId activeWindow()
Returns the currently active window, or 0 if no window is active.
Definition: kwindowsystem_mac.cpp:348
QString fromUtf8(const char *str, int size)
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
int top() const
void setTop(int y)
Definition: netwm_def.h:618
int left() const
unsigned long appUserTime()
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
const char * constData() const
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
QPoint center() const
WId winId() const
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
virtual void connectNotify(const char *signal)
QString toLower() const
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
bool isNull() const
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.
int height() const
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
bool contains(const T &value) const
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
void setRight(int x)
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.
QDesktopWidget * desktop()
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
QWidget * find(WId id)
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
int height() const
void numberOfDesktopsChanged(int num)
The number of desktops changed.
static void create_atoms(Display *dpy=QX11Info::display())
Definition: kwindowsystem_x11.cpp:331
int bottom() const
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
QSize size() const
void setX(int x)
void setY(int y)
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
QRect intersect(const QRect &rectangle) const
Definition: netwm_def.h:619
uchar * bits()
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
QImage toImage() const
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
void setLeft(int x)
iterator begin()
Definition: netwm_def.h:635
Definition: netwm_def.h:704
height
QImage scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const
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
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.