KDEUI
netwm.cpp
Go to the documentation of this file.
479 static void readIcon(Display* display, Window window, Atom property, NETRArray<NETIcon>& icons, int& icon_count) {
670 p->client_properties[ PROTOCOLS ] = DesktopNames // the only thing that can be changed by clients
682 NETRootInfo::NETRootInfo(Display *display, const unsigned long properties[], int properties_size,
1736 void NETRootInfo::moveResizeWindowRequest(Window window, int flags, int x, int y, int width, int height )
1761 void NETRootInfo::restackRequest(Window window, RequestSource src, Window above, int detail, Time timestamp )
2936 void NETWinInfo::setIconInternal(NETRArray<NETIcon>& icons, int& icon_count, Atom property, NETIcon icon, Bool replace) {
3649 NETIcon NETWinInfo::iconInternal(NETRArray<NETIcon>& icons, int icon_count, int width, int height) const {
void kdeGeometry(NETRect &frame, NETRect &window)
Places the window frame geometry in frame, and the application window geometry in window.
Definition: netwm.cpp:3605
void setExtendedStrut(const NETExtendedStrut &extended_strut)
Set the extended (partial) strut for the application window.
Definition: netwm.cpp:3012
Bool handledIcons() const
Returns whether or not this client handles icons.
Definition: netwm.cpp:4715
virtual void changeState(unsigned long state, unsigned long mask)
A Window Manager should subclass NETWinInfo and reimplement this function when it wants to know when ...
Definition: netwm.h:1356
void setStartupId(const char *startup_id)
Sets the startup notification id id on the window.
Definition: netwm.cpp:3509
static void setOnDesktop(WId win, int desktop)
Moves window win to desktop desktop.
Definition: kwindowsystem_mac.cpp:406
virtual void virtual_hook(int id, void *data)
Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.
Definition: netwm.cpp:4732
NET::Orientation desktopLayoutOrientation() const
Returns the desktop layout orientation.
Definition: netwm.cpp:2724
Definition: netwm_def.h:194
QSize desktopLayoutColumnsRows() const
Returns the desktop layout number of columns and rows.
Definition: netwm.cpp:2729
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 setIconGeometry(NETRect geometry)
Set the icon geometry for the application window.
Definition: netwm.cpp:2992
void setIcon(NETIcon icon, Bool replace=True)
Set icons for the application window.
Definition: netwm.cpp:2932
NET::DesktopLayoutCorner desktopLayoutCorner() const
Returns the desktop layout starting corner.
Definition: netwm.cpp:2734
void setOpacity(unsigned long opacity)
Sets opacity (0 = transparent, 0xffffffff = opaque ) on the window.
Definition: netwm.cpp:3519
const unsigned long * supportedProperties() const
In the Window Manager mode, this is equivalent to the properties argument passed to the constructor.
Definition: netwm.cpp:2565
void setDesktop(int desktop, bool ignore_viewport=false)
Set which window the desktop is (should be) on.
Definition: netwm.cpp:3442
int left
Monitor index whose left border defines the left edge of the topology.
Definition: netwm_def.h:254
void setState(unsigned long state, unsigned long mask)
Set the state for the application window (see the NET base class documentation for a description of w...
Definition: netwm.cpp:3068
NETRootInfo(Display *display, Window supportWindow, const char *wmName, const unsigned long properties[], int properties_size, int screen=-1, bool doActivate=true)
Window Managers should use this constructor to create a NETRootInfo object, which will be used to set...
Definition: netwm.cpp:630
MappingState mappingState() const
Returns the mapping state for the window (see the NET base class documentation for a description of m...
Definition: netwm.cpp:4725
This class is an extension of the NETWinInfo class, and exists solely for binary compatibility reason...
Definition: netwm.h:1381
static void setCurrentDesktop(int desktop)
Convenience function to set the current desktop to desktop.
Definition: kwindowsystem_mac.cpp:394
int timestampCompare(unsigned long time1_, unsigned long time2_)
Compares two X timestamps, taking into account wrapping and 64bit architectures.
Definition: kxutils.cpp:111
Time userTime() const
Returns the time of last user action on the window, or -1 if not set.
Definition: netwm.cpp:4650
const Window * clientListStacking() const
Returns an array of Window id's, which contain all managed windows in stacking order.
Definition: netwm.cpp:2670
@ SkipTaskbar
indicates that a window should not be included on a taskbar.
Definition: netwm_def.h:457
@ WindowManager
indicates that the application is a window manager application.
Definition: netwm_def.h:298
@ Hidden
indicates that a window should not be visible on the screen (e.g.
Definition: netwm_def.h:475
virtual void moveResizeWindow(Window window, int flags, int x, int y, int width, int height)
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when...
Definition: netwm.h:768
static Atom net_wm_window_type_dropdown_menu
Definition: netwm.cpp:117
virtual void changeDesktopGeometry(int desktop, const NETSize &geom)
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when...
Definition: netwm.h:690
virtual void restackWindow(Window window, RequestSource source, Window above, int detail, Time timestamp)
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when...
Definition: netwm.h:781
void setWorkArea(int desktop, const NETRect &workArea)
Sets the workarea for the specified desktop.
Definition: netwm.cpp:1587
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
void closeWindowRequest(Window window)
Clients (such as pagers/taskbars) that wish to close a window should call this function.
Definition: netwm.cpp:1686
Simple multiple monitor topology class for NET classes.
Definition: netwm_def.h:234
void setAllowedActions(unsigned long actions)
Sets actions that the window manager allows for the window.
Definition: netwm.cpp:3527
NETExtendedStrut extendedStrut() const
Returns the extended (partial) strut specified by this client.
Definition: netwm.cpp:4567
const char * windowClassClass() const
Returns the class component of the window class for the window (i.e.
Definition: netwm.cpp:4678
const Window * virtualRoots() const
Returns an array of Window id's, which contain the virtual root windows.
Definition: netwm.cpp:2714
const char * visibleName() const
Returns the visible name as set by the window manager in UTF-8 format.
Definition: netwm.cpp:4625
@ Sticky
indicates that the Window Manager SHOULD keep the window's position fixed on the screen,...
Definition: netwm_def.h:437
virtual void changeDesktopViewport(int desktop, const NETPoint &viewport)
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when...
Definition: netwm.h:701
@ Iconic
indicates that the client window is not visible, but its icon is.
Definition: netwm_def.h:547
NETSize desktopGeometry(int desktop) const
Returns the desktop geometry size.
Definition: netwm.cpp:2680
bool isBlockingCompositing() const
Returns whether the client wishes to block compositing (for better performance)
Definition: netwm.cpp:4711
void setClientListStacking(const Window *windows, unsigned int count)
Sets the list of managed windows in stacking order on the Root/Desktop window.
Definition: netwm.cpp:867
static bool typeMatchesMask(WindowType type, unsigned long mask)
Returns true if the given window type matches the mask given using WindowTypeMask flags.
Definition: netwm.cpp:4575
@ DNDIcon
indicates a window that represents the dragged object during DND operation
Definition: netwm_def.h:377
@ KeepAbove
indicates that a window should on top of most windows (but below fullscreen windows).
Definition: netwm_def.h:462
@ KeepBelow
indicates that a window should be below most windows (but above any desktop windows).
Definition: netwm_def.h:484
const char * desktopName(int desktop) const
Returns the name for the specified desktop.
Definition: netwm.cpp:2705
const char * startupId() const
Returns the startup notification id of the window.
Definition: netwm.cpp:4654
virtual void gotTakeActivity(Window window, Time timestamp, long flags)
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to receive r...
Definition: netwm.h:790
unsigned long allowedActions() const
Returns actions that the window manager allows for the window.
Definition: netwm.cpp:4662
const Window * clientList() const
Returns an array of Window id's, which contain all managed windows.
Definition: netwm.cpp:2660
const char * windowRole() const
Returns the window role for the window (i.e.
Definition: netwm.cpp:4686
static void readIcon(Display *display, Window window, Atom property, NETRArray< NETIcon > &icons, int &icon_count)
Definition: netwm.cpp:479
int desktop(bool ignore_viewport=false) const
Returns the desktop where the window is residing.
Definition: netwm.cpp:4640
KAction * replace(const QObject *recvr, const char *slot, QObject *parent)
Find and replace matches.
Definition: kstandardaction.cpp:344
virtual void virtual_hook(int id, void *data)
Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.
Definition: netwm.cpp:4729
static int numberOfDesktops()
Returns the number of virtual desktops.
Definition: kwindowsystem_mac.cpp:389
void takeActivity(Window window, Time timestamp, long flags)
Sends a take activity message with the given timestamp to the window, using the _NET_WM_TAKE_ACTIVITY...
Definition: netwm.cpp:1807
void setDesktopLayout(NET::Orientation orientation, int columns, int rows, NET::DesktopLayoutCorner corner)
Sets the desktop layout.
Definition: netwm.cpp:1634
static const int OnAllDesktops
Sentinel value to indicate that the client wishes to be visible on all desktops.
Definition: netwm.h:1335
virtual void changeCurrentDesktop(int desktop)
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when...
Definition: netwm.h:710
WindowType windowType(unsigned long supported_types) const
Returns the window type for this client (see the NET base class documentation for a description of th...
Definition: netwm.cpp:4605
@ Withdrawn
indicates that neither the client window nor its icon is visible.
Definition: netwm_def.h:541
void sendPing(Window window, Time timestamp)
Sends a ping with the given timestamp to the window, using the _NET_WM_PING protocol.
Definition: netwm.cpp:1785
void moveResizeRequest(Window window, int x_root, int y_root, Direction direction)
Clients (such as pagers/taskbars) that wish to start a WMMoveResize (where the window manager control...
Definition: netwm.cpp:1710
void setDesktopViewport(int desktop, const NETPoint &viewport)
Sets the viewport for the current desktop to the specified point.
Definition: netwm.cpp:1026
void setHandledIcons(Bool handled)
Set whether this application window handles icons.
Definition: netwm.cpp:3500
NETRect workArea(int desktop) const
Returns the workArea for the specified desktop.
Definition: netwm.cpp:2695
Definition: netwm.h:43
const char * clientMachine() const
Returns the client machine for the window (i.e.
Definition: netwm.cpp:4690
virtual void changeActiveWindow(Window window, NET::RequestSource src, Time timestamp, Window active_window)
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when...
Definition: netwm.h:753
const char * activities() const
returns a comma-separated list of the activities the window is associated with.
Definition: netwm.cpp:4694
@ FullScreen
indicates that a window should fill the entire screen and have no window decorations.
Definition: netwm_def.h:480
void setClientList(const Window *windows, unsigned int count)
Sets the list of managed windows on the Root/Desktop window.
Definition: netwm.cpp:848
int timestampDiff(unsigned long time1_, unsigned long time2_)
Returns a difference of two X timestamps, time2 - time1, where time2 must be later than time1,...
Definition: kxutils.cpp:120
virtual void moveResize(Window window, int x_root, int y_root, unsigned long direction)
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when...
Definition: netwm.h:733
static KWindowInfo windowInfo(WId win, unsigned long properties, unsigned long properties2=0)
Returns information about window win.
Definition: kwindowsystem_mac.cpp:330
void setVirtualRoots(const Window *windows, unsigned int count)
Sets the list of virtual root windows on the root window.
Definition: netwm.cpp:1616
bool hasWindowType() const
This function returns false if the window has not window type specified at all.
Definition: netwm.cpp:4616
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
void setVisibleName(const char *visibleName)
For Window Managers only: set the visible name ( i.e.
Definition: netwm.cpp:3400
NETFullscreenMonitors fullscreenMonitors() const
Returns the desired fullscreen monitor topology for this client, should it be in fullscreen state.
Definition: netwm.cpp:4571
const char * visibleIconName() const
Returns the visible iconic name as set by the window manager in UTF-8 format.
Definition: netwm.cpp:4635
void setNumberOfDesktops(int numberOfDesktops)
Sets the number of desktops to the specified number.
Definition: netwm.cpp:886
bool hasNETSupport() const
Returns true if the window has any window type set, even if the type itself is not known to this impl...
Definition: netwm.cpp:4666
NETPoint desktopViewport(int desktop) const
Returns the viewport of the specified desktop.
Definition: netwm.cpp:2685
int clientListStackingCount() const
Returns the number of managed windows in the clientListStacking array.
Definition: netwm.cpp:2675
const char * iconName() const
Returns the iconic name of the window in UTF-8 format.
Definition: netwm.cpp:4630
static int timestampDiff(unsigned long time1, unsigned long time2)
Returns a difference of two X timestamps, time2 - time1, where time2 must be later than time1,...
Definition: netwm.cpp:4740
void setDesktopGeometry(int desktop, const NETSize &geometry)
Sets the desktop geometry to the specified geometry.
Definition: netwm.cpp:991
const NETWinInfo & operator=(const NETWinInfo &wintinfo)
Assignment operator.
Definition: netwm.cpp:2913
void setWindowType(WindowType type)
Sets the window type for this client (see the NET base class documentation for a description of the v...
Definition: netwm.cpp:3272
NETWinInfo(Display *display, Window window, Window rootWindow, const unsigned long properties[], int properties_size, Role role=Client)
Create a NETWinInfo object, which will be used to set/read/change information stored on an applicatio...
Definition: netwm.cpp:2762
unsigned long state() const
Returns the state of the window (see the NET base class documentation for a description of the variou...
Definition: netwm.cpp:4558
Window groupLeader() const
Returns the leader window for the group the window is in, if any.
Definition: netwm.cpp:4674
int bottom
Monitor index whose bottom border defines the bottom edge of the topology.
Definition: netwm_def.h:249
virtual void changeShowingDesktop(bool showing)
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when...
Definition: netwm.h:799
Window transientFor() const
Returns the WM_TRANSIENT_FOR property for the window, i.e.
Definition: netwm.cpp:4670
virtual void changeNumberOfDesktops(int numberOfDesktops)
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when...
Definition: netwm.h:679
void setVisibleIconName(const char *name)
For Window Managers only: set the visible iconic name ( i.e.
Definition: netwm.cpp:3428
void setActiveWindow(Window window, NET::RequestSource src, Time timestamp, Window active_window)
Requests that the specified window becomes the active (focused) one.
Definition: netwm.cpp:1556
int desktop() const
Returns the virtual desktop this window is on (NET::OnAllDesktops if the window is on all desktops).
Definition: kwindowinfo_mac.cpp:273
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
void setSupported(NET::Property property, bool on=true)
Sets the given property if on is true, and clears the property otherwise.
Definition: netwm.cpp:2575
@ DemandsAttention
there was an attempt to activate this window, but the window manager prevented this.
Definition: netwm_def.h:490
void setCurrentDesktop(int desktop, bool ignore_viewport=false)
Sets the current desktop to the specified desktop.
Definition: netwm.cpp:918
static int currentDesktop()
Returns the current virtual desktop.
Definition: kwindowsystem_mac.cpp:384
void restackRequest(Window window, RequestSource source, Window above, int detail, Time timestamp)
Sends the _NET_RESTACK_WINDOW request.
Definition: netwm.cpp:1761
void event(XEvent *event, unsigned long *properties, int properties_size)
This function takes the passed XEvent and returns an OR'ed list of NETWinInfo properties that have ch...
Definition: netwm.cpp:3699
#define mask
void setDesktopName(int desktop, const char *desktopName)
Sets the name of the specified desktop.
Definition: netwm.cpp:955
int numberOfDesktops(bool ignore_viewport=false) const
Returns the number of desktops.
Definition: netwm.cpp:2739
virtual void closeWindow(Window window)
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when...
Definition: netwm.h:718
void setShowingDesktop(bool showing)
Sets the _NET_SHOWING_DESKTOP status (whether desktop is being shown).
Definition: netwm.cpp:1657
#define CHECK_TYPE_MASK(type)
const NETRootInfo & operator=(const NETRootInfo &rootinfo)
Assignment operator.
Definition: netwm.cpp:1833
virtual void changeDesktop(int desktop)
A Window Manager should subclass NETWinInfo and reimplement this function when it wants to know when ...
Definition: netwm.h:1345
int top
Monitor index whose top border defines the top edge of the topology.
Definition: netwm_def.h:244
static int timestampCompare(unsigned long time1, unsigned long time2)
Compares two X timestamps, taking into account wrapping and 64bit architectures.
Definition: netwm.cpp:4735
void setFrameOverlap(NETStrut strut)
Sets the window frame overlap strut, i.e.
Definition: netwm.cpp:3581
void setIconName(const char *name)
Sets the iconic name for the application window.
Definition: netwm.cpp:3414
int right
Monitor index whose right border defines the right edge of the topology.
Definition: netwm_def.h:259
void activate()
Window Managers must call this after creating the NETRootInfo object, and before using any other meth...
Definition: netwm.cpp:827
const char * windowClassName() const
Returns the name component of the window class for the window (i.e.
Definition: netwm.cpp:4682
int virtualRootsCount() const
Returns the number of window in the virtualRoots array.
Definition: netwm.cpp:2719
const unsigned long * passedProperties() const
Returns the properties argument passed to the constructor.
Definition: netwm.cpp:2569
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
None
void setUserTime(Time time)
Sets user timestamp time on the window (property _NET_WM_USER_TIME).
Definition: netwm.cpp:3682
const unsigned long * passedProperties() const
Returns the properties argument passed to the constructor.
Definition: netwm.cpp:4720
virtual void gotPing(Window window, Time timestamp)
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to receive r...
Definition: netwm.h:742
Window
int currentDesktop(bool ignore_viewport=false) const
Returns the current desktop.
Definition: netwm.cpp:2746
void setFullscreenMonitors(NETFullscreenMonitors topology)
Sets the desired multiple-monitor topology (4 monitor indices indicating the top, bottom,...
Definition: netwm.cpp:3052
int clientListCount() const
Returns the number of managed windows in clientList array.
Definition: netwm.cpp:2665
bool isSupported(NET::Property property) const
Returns true if the given property is supported by the window manager.
Definition: netwm.cpp:2640
void setBlockingCompositing(bool active)
Sets whether the client wishes to block compositing (for better performance)
Definition: netwm.cpp:4698
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jan 30 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jan 30 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.