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())
443KWindowInfo 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 KIconLoader * global()
Returns the global icon loader initialized with the global KComponentData.
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
Convenience access to certain properties and features of the window manager.
Definition kwindowsystem.h:56
static int viewportToDesktop(const QPoint &pos)
Definition kwindowsystem_x11.cpp:1059
void stackingOrderChanged()
Emitted when the stacking order of the window changed.
static void setType(WId win, NET::WindowType windowType)
Sets the type of window win to windowType.
Definition kwindowsystem_mac.cpp:473
static void setOnDesktop(WId win, int desktop)
Moves window win to desktop desktop.
Definition kwindowsystem_mac.cpp:406
void strutChanged()
Something changed with the struts, may or may not have changed the work area.
static void setDesktopName(int desktop, const QString &name)
Sets the name of the specified desktop.
Definition kwindowsystem_mac.cpp:566
static bool allowedActionsSupported()
Returns true if the WM announces which actions it allows for windows.
Definition kwindowsystem_mac.cpp:597
void numberOfDesktopsChanged(int num)
The number of desktops changed.
void compositingChanged(bool enabled)
Compositing was enabled or disabled.
static void setState(WId win, unsigned long state)
Sets the state of window win to state.
Definition kwindowsystem_mac.cpp:506
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 void allowExternalProcessWindowActivation(int pid=-1)
Allows a window from another process to raise and activate itself.
Definition kwindowsystem_mac.cpp:622
static void setMainWindow(QWidget *subwindow, WId mainwindow)
Sets the parent window of subwindow to be mainwindow.
Definition kwindowsystem_mac.cpp:412
void currentDesktopChanged(int desktop)
Switched to another virtual desktop.
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
static WId transientFor(WId window)
Returns the WM_TRANSIENT_FOR property for the given window, i.e.
Definition kwindowsystem_x11.cpp:603
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
void showingDesktopChanged(bool showing)
The state of showing the desktop has changed.
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
static int viewportWindowToDesktop(const QRect &r)
Definition kwindowsystem_x11.cpp:1072
static void doNotManage(const QString &title)
Informs kwin via dbus to not manage a window with the specified title.
Definition kwindowsystem_mac.cpp:609
virtual void connectNotify(const char *signal)
Definition kwindowsystem_mac.cpp:616
static void setBlockingCompositing(WId window, bool active)
Sets whether the client wishes to block compositing (for better performance)
Definition kwindowsystem_mac.cpp:627
static bool hasWId(WId id)
Test to see if id still managed at present.
Definition kwindowsystem_mac.cpp:324
static void activateWindow(WId win, long time=0)
Requests that window win is activated.
Definition kwindowsystem_mac.cpp:355
static void setUserTime(WId win, long time)
Sets user timestamp time on window win.
Definition kwindowsystem_mac.cpp:577
static bool compositingActive()
Returns true if a compositing manager is running (i.e.
Definition kwindowsystem_mac.cpp:379
static KWindowInfo windowInfo(WId win, unsigned long properties, unsigned long properties2=0)
Returns information about window win.
Definition kwindowsystem_mac.cpp:330
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
static QPoint desktopToViewport(int desktop, bool absolute)
Definition kwindowsystem_x11.cpp:1089
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
void windowChanged(WId id, const unsigned long *properties)
The window changed.
static void clearState(WId win, unsigned long state)
Clears the state of window win from state.
Definition kwindowsystem_mac.cpp:512
static bool icccmCompliantMappingState()
Definition kwindowsystem_mac.cpp:542
static QString desktopName(int desktop)
Returns the name of the specified desktop.
Definition kwindowsystem_mac.cpp:561
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 WId groupLeader(WId window)
Returns the leader window for the group the given window is in, if any.
Definition kwindowsystem_x11.cpp:622
static void minimizeWindow(WId win, bool animation=true)
Iconifies a window.
Definition kwindowsystem_mac.cpp:518
static void setCurrentDesktop(int desktop)
Convenience function to set the current desktop to desktop.
Definition kwindowsystem_mac.cpp:394
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
static WId activeWindow()
Returns the currently active window, or 0 if no window is active.
Definition kwindowsystem_mac.cpp:348
void activeWindowChanged(WId id)
Hint that <Window> is active (= has focus) now.
static void unminimizeWindow(WId win, bool animation=true)
DeIconifies a window.
Definition kwindowsystem_mac.cpp:524
static bool showingDesktop()
Returns the state of showing the desktop.
Definition kwindowsystem_mac.cpp:572
static void forceActiveWindow(WId win, long time=0)
Sets window win to be the active window.
Definition kwindowsystem_mac.cpp:366
static int numberOfDesktops()
Returns the number of virtual desktops.
Definition kwindowsystem_mac.cpp:389
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 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
static QPoint constrainViewportRelativePosition(const QPoint &pos)
Definition kwindowsystem_x11.cpp:1116
int currentDesktop(bool ignore_viewport=false) const
Returns the current desktop.
Definition netwm.cpp:2746
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 setDesktopName(int desktop, const char *desktopName)
Sets the name of the specified desktop.
Definition netwm.cpp:955
void activate()
Window Managers must call this after creating the NETRootInfo object, and before using any other meth...
Definition netwm.cpp:827
int clientListStackingCount() const
Returns the number of managed windows in the clientListStacking array.
Definition netwm.cpp:2675
NETPoint desktopViewport(int desktop) const
Returns the viewport of the specified desktop.
Definition netwm.cpp:2685
const char * desktopName(int desktop) const
Returns the name for the specified desktop.
Definition netwm.cpp:2705
void moveResizeWindowRequest(Window window, int flags, int x, int y, int width, int height)
Clients (such as pagers/taskbars) that wish to move/resize a window using WM2MoveResizeWindow (_NET_M...
Definition netwm.cpp:1736
NETRect workArea(int desktop) const
Returns the workArea for the specified desktop.
Definition netwm.cpp:2695
bool isSupported(NET::Property property) const
Returns true if the given property is supported by the window manager.
Definition netwm.cpp:2640
int numberOfDesktops(bool ignore_viewport=false) const
Returns the number of desktops.
Definition netwm.cpp:2739
NETSize desktopGeometry(int desktop) const
Returns the desktop geometry size.
Definition netwm.cpp:2680
const Window * clientListStacking() const
Returns an array of Window id's, which contain all managed windows in stacking order.
Definition netwm.cpp:2670
static const int OnAllDesktops
Sentinel value to indicate that the client wishes to be visible on all desktops.
Definition netwm.h:1335
@ Sticky
indicates that the Window Manager SHOULD keep the window's position fixed on the screen,...
Definition netwm_def.h:437
@ DemandsAttention
there was an attempt to activate this window, but the window manager prevented this.
Definition netwm_def.h:490
@ FromApplication
indicates that the request comes from a normal application
Definition netwm_def.h:718
#define K_GLOBAL_STATIC(TYPE, NAME)
#define mask
QString i18n(const char *text)
static void sendClientMessageToRoot(Window w, Atom a, long x, long y=0, long z=0)
Definition kwindowsystem_x11.cpp:362
static void create_atoms(Display *dpy=QX11Info::display())
Definition kwindowsystem_x11.cpp:331
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition kstandardaction.cpp:223
void installEventFilter(QWidget *filter)
Installs a widget filter as a global X11 event filter.
Definition ksystemeventfilter.cpp:146
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
None
Definition netwm_def.h:194
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Jul 18 2024 00:00:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Jul 18 2024 00:00:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.