mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
Revert "generic: port some functionality to XCB"
This commit is contained in:
parent
1a7f235eba
commit
293c931e22
7 changed files with 93 additions and 242 deletions
|
@ -40,10 +40,6 @@ if(UNIX AND Q_WS_X11)
|
||||||
if(NOT X11_SM_FOUND)
|
if(NOT X11_SM_FOUND)
|
||||||
message(FATAL_ERROR "\nThe X11 Session Management (SM) development package could not be found.\nPlease install libSM.\n")
|
message(FATAL_ERROR "\nThe X11 Session Management (SM) development package could not be found.\nPlease install libSM.\n")
|
||||||
endif(NOT X11_SM_FOUND)
|
endif(NOT X11_SM_FOUND)
|
||||||
find_package(XCB)
|
|
||||||
if(NOT XCB_FOUND)
|
|
||||||
message(FATAL_ERROR "\nThe XCB development package could not be found.\nPlease install libxcb.\n")
|
|
||||||
endif(NOT XCB_FOUND)
|
|
||||||
endif(UNIX AND Q_WS_X11)
|
endif(UNIX AND Q_WS_X11)
|
||||||
|
|
||||||
# required features
|
# required features
|
||||||
|
|
|
@ -1,128 +0,0 @@
|
||||||
# Try to find XCB on a Unix system
|
|
||||||
#
|
|
||||||
# This will define:
|
|
||||||
#
|
|
||||||
# XCB_FOUND - True if xcb is available
|
|
||||||
# XCB_LIBRARIES - Link these to use xcb
|
|
||||||
# XCB_INCLUDE_DIR - Include directory for xcb
|
|
||||||
# XCB_DEFINITIONS - Compiler flags for using xcb
|
|
||||||
#
|
|
||||||
# In addition the following more fine grained variables will be defined:
|
|
||||||
#
|
|
||||||
# XCB_XCB_FOUND XCB_XCB_INCLUDE_DIR XCB_XCB_LIBRARIES
|
|
||||||
# XCB_COMPOSITE_FOUND XCB_COMPOSITE_INCLUDE_DIR XCB_COMPOSITE_LIBRARIES
|
|
||||||
# XCB_DAMAGE_FOUND XCB_DAMAGE_INCLUDE_DIR XCB_DAMAGE_LIBRARIES
|
|
||||||
# XCB_XFIXES_FOUND XCB_XFIXES_INCLUDE_DIR XCB_XFIXES_LIBRARIES
|
|
||||||
# XCB_RENDER_FOUND XCB_RENDER_INCLUDE_DIR XCB_RENDER_LIBRARIES
|
|
||||||
# XCB_RANDR_FOUND XCB_RANDR_INCLUDE_DIR XCB_RANDR_LIBRARIES
|
|
||||||
# XCB_SHAPE_FOUND XCB_SHAPE_INCLUDE_DIR XCB_SHAPE_LIBRARIES
|
|
||||||
# XCB_SHM_FOUND XCB_SHM_INCLUDE_DIR XCB_SHM_LIBRARIES
|
|
||||||
# XCB_SYNC_FOUND XCB_SYNC_INCLUDE_DIR XCB_SYNC_LIBRARIES
|
|
||||||
# XCB_IMAGE_FOUND XCB_IMAGE_INCLUDE_DIR XCB_IMAGE_LIBRARIES
|
|
||||||
# XCB_RENDERUTIL_FOUND XCB_RENDERUTIL_INCLUDE_DIR XCB_RENDERUTIL_LIBRARIES
|
|
||||||
# XCB_KEYSYMS_FOUND XCB_KEYSYMS_INCLUDE_DIR XCB_KEYSYMS_LIBRARIES
|
|
||||||
# XCB_XTEST_FOUND XCB_XTEST_INCLUDE_DIR XCB_XTEST_LIBRARIES
|
|
||||||
# XCB_RECORD_FOUND XCB_RECORD_INCLUDE_DIR XCB_RECORD_LIBRARIES
|
|
||||||
#
|
|
||||||
# Copyright (c) 2012 Fredrik Höglund <fredrik@kde.org>
|
|
||||||
#
|
|
||||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
||||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
||||||
|
|
||||||
|
|
||||||
IF (NOT WIN32)
|
|
||||||
IF (XCB_INCLUDE_DIR AND XCB_LIBRARIES)
|
|
||||||
# In the cache already
|
|
||||||
SET(XCB_FIND_QUIETLY TRUE)
|
|
||||||
ENDIF (XCB_INCLUDE_DIR AND XCB_LIBRARIES)
|
|
||||||
|
|
||||||
# Use pkg-config to get the directories and then use these values
|
|
||||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
|
||||||
FIND_PACKAGE(PkgConfig)
|
|
||||||
PKG_CHECK_MODULES(PKG_XCB QUIET xcb xcb-util xcb-composite xcb-xfixes xcb-damage xcb-render xcb-randr
|
|
||||||
xcb-shape xcb-dri2 xcb-glx xcb-shm xcb-xv xcb-sync xcb-record
|
|
||||||
xcb-xtest xcb-icccm xcb-ewmh xcb-image xcb-renderutil xcb-keysyms)
|
|
||||||
|
|
||||||
SET(XCB_DEFINITIONS ${PKG_XCB_CFLAGS})
|
|
||||||
|
|
||||||
FIND_PATH(XCB_XCB_INCLUDE_DIR NAMES xcb/xcb.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_COMPOSITE_INCLUDE_DIR NAMES xcb/composite.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_XFIXES_INCLUDE_DIR NAMES xcb/xfixes.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_DAMAGE_INCLUDE_DIR NAMES xcb/damage.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_RENDER_INCLUDE_DIR NAMES xcb/render.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_RANDR_INCLUDE_DIR NAMES xcb/randr.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_SHAPE_INCLUDE_DIR NAMES xcb/shape.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_SHM_INCLUDE_DIR NAMES xcb/shm.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_SYNC_INCLUDE_DIR NAMES xcb/sync.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_IMAGE_INCLUDE_DIR NAMES xcb/xcb_image.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_RENDERUTIL_INCLUDE_DIR NAMES xcb/xcb_renderutil.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_KEYSYMS_INCLUDE_DIR NAMES xcb/xcb_keysyms.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_XTEST_INCLUDE_DIR NAMES xcb/xtest.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
FIND_PATH(XCB_RECORD_INCLUDE_DIR NAMES xcb/record.h HINTS ${PKG_XCB_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
FIND_LIBRARY(XCB_XCB_LIBRARIES NAMES xcb HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_COMPOSITE_LIBRARIES NAMES xcb-composite HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_DAMAGE_LIBRARIES NAMES xcb-damage HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_XFIXES_LIBRARIES NAMES xcb-xfixes HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_RENDER_LIBRARIES NAMES xcb-render HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_RANDR_LIBRARIES NAMES xcb-randr HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_SHAPE_LIBRARIES NAMES xcb-shape HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_SHM_LIBRARIES NAMES xcb-shm HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_SYNC_LIBRARIES NAMES xcb-sync HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_IMAGE_LIBRARIES NAMES xcb-image HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_RENDERUTIL_LIBRARIES NAMES xcb-render-util HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_KEYSYMS_LIBRARIES NAMES xcb-keysyms HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_XTEST_LIBRARIES NAMES xcb-xtest HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
FIND_LIBRARY(XCB_RECORD_LIBRARIES NAMES xcb-record HINTS ${PKG_XCB_LIBRARY_DIRS})
|
|
||||||
|
|
||||||
set(XCB_INCLUDE_DIR ${XCB_XCB_INCLUDE_DIR} ${XCB_COMPOSITE_INCLUDE_DIR} ${XCB_XFIXES_INCLUDE_DIR}
|
|
||||||
${XCB_DAMAGE_INCLUDE_DIR} ${XCB_RENDER_INCLUDE_DIR} ${XCB_RANDR_INCLUDE_DIR}
|
|
||||||
${XCB_SHAPE_INCLUDE_DIR} ${XCB_SHM_INCLUDE_DIR} ${XCB_SYNC_INCLUDE_DIR}
|
|
||||||
${XCB_IMAGE_INCLUDE_DIR} ${XCB_RENDERUTIL_INCLUDE_DIR} ${XCB_KEYSYMS_INCLUDE_DIR}
|
|
||||||
${XCB_XTEST_INCLUDE_DIR} ${XCB_RECORD_INCLUDE_DIR})
|
|
||||||
|
|
||||||
set(XCB_LIBRARIES ${XCB_XCB_LIBRARIES} ${XCB_COMPOSITE_LIBRARIES} ${XCB_XFIXES_LIBRARIES}
|
|
||||||
${XCB_DAMAGE_LIBRARIES} ${XCB_RENDER_LIBRARIES} ${XCB_RANDR_LIBRARIES}
|
|
||||||
${XCB_SHAPE_LIBRARIES} ${XCB_SHM_LIBRARIES} ${XCB_SYNC_LIBRARIES}
|
|
||||||
${XCB_IMAGE_LIBRARIES} ${XCB_RENDERUTIL_LIBRARIES} ${XCB_KEYSYMS_LIBRARIES}
|
|
||||||
${XCB_XTEST_LIBRARIES} ${XCB_RECORD_LIBRARIES})
|
|
||||||
|
|
||||||
list(REMOVE_DUPLICATES XCB_INCLUDE_DIR)
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_XCB DEFAULT_MSG XCB_XCB_LIBRARIES XCB_XCB_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_COMPOSITE DEFAULT_MSG XCB_COMPOSITE_LIBRARIES XCB_COMPOSITE_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_DAMAGE DEFAULT_MSG XCB_DAMAGE_LIBRARIES XCB_DAMAGE_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_XFIXES DEFAULT_MSG XCB_XFIXES_LIBRARIES XCB_XFIXES_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_RENDER DEFAULT_MSG XCB_RENDER_LIBRARIES XCB_RENDER_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_RANDR DEFAULT_MSG XCB_RANDR_LIBRARIES XCB_RANDR_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_SHAPE DEFAULT_MSG XCB_SHAPE_LIBRARIES XCB_SHAPE_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_SHM DEFAULT_MSG XCB_SHM_LIBRARIES XCB_SHM_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_SYNC DEFAULT_MSG XCB_SYNC_LIBRARIES XCB_SYNC_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_IMAGE DEFAULT_MSG XCB_IMAGE_LIBRARIES XCB_IMAGE_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_RENDERUTIL DEFAULT_MSG XCB_RENDERUTIL_LIBRARIES XCB_RENDERUTIL_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_KEYSYMS DEFAULT_MSG XCB_KEYSYMS_LIBRARIES XCB_KEYSYMS_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_XTEST DEFAULT_MSG XCB_XTEST_LIBRARIES XCB_XTEST_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_RECORD DEFAULT_MSG XCB_RECORD_LIBRARIES XCB_RECORD_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB DEFAULT_MSG XCB_LIBRARIES XCB_INCLUDE_DIR)
|
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
|
||||||
XCB_INCLUDE_DIR XCB_LIBRARIES
|
|
||||||
XCB_XCB_INCLUDE_DIR XCB_XCB_LIBRARIES
|
|
||||||
XCB_COMPOSITE_INCLUDE_DIR XCB_COMPOSITE_LIBRARIES
|
|
||||||
XCB_DAMAGE_INCLUDE_DIR XCB_DAMAGE_LIBRARIES
|
|
||||||
XCB_XFIXES_INCLUDE_DIR XCB_XFIXES_LIBRARIES
|
|
||||||
XCB_RENDER_INCLUDE_DIR XCB_RENDER_LIBRARIES
|
|
||||||
XCB_RANDR_INCLUDE_DIR XCB_RANDR_LIBRARIES
|
|
||||||
XCB_SHAPE_INCLUDE_DIR XCB_SHAPE_LIBRARIES
|
|
||||||
XCB_SHM_INCLUDE_DIR XCB_SHM_LIBRARIES
|
|
||||||
XCB_SYNC_INCLUDE_DIR XCB_SYNC_LIBRARIES
|
|
||||||
XCB_IMAGE_INCLUDE_DIR XCB_IMAGE_LIBRARIES
|
|
||||||
XCB_RENDERUTIL_INCLUDE_DIR XCB_RENDERUTIL_LIBRARIES
|
|
||||||
XCB_KEYSYMS_INCLUDE_DIR XCB_KEYSYMS_LIBRARIES
|
|
||||||
XCB_XTEST_INCLUDE_DIR XCB_XTEST_LIBRARIES
|
|
||||||
XCB_RECORD_INCLUDE_DIR XCB_RECORD_LIBRARIES
|
|
||||||
)
|
|
||||||
|
|
||||||
ENDIF (NOT WIN32)
|
|
|
@ -318,7 +318,6 @@ if (Q_WS_X11 AND X11_Xkb_FOUND)
|
||||||
include_directories (
|
include_directories (
|
||||||
${X11_Xkb_INCLUDE_PATH}
|
${X11_Xkb_INCLUDE_PATH}
|
||||||
${X11_Xlib_INCLUDE_PATH}
|
${X11_Xlib_INCLUDE_PATH}
|
||||||
${XCB_INCLUDES}
|
|
||||||
)
|
)
|
||||||
set(kdeui_LIB_SRCS
|
set(kdeui_LIB_SRCS
|
||||||
${kdeui_LIB_SRCS}
|
${kdeui_LIB_SRCS}
|
||||||
|
@ -403,10 +402,6 @@ if(X11_Xrender_FOUND)
|
||||||
target_link_libraries(kdeui PRIVATE ${X11_Xrender_LIB})
|
target_link_libraries(kdeui PRIVATE ${X11_Xrender_LIB})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(XCB_FOUND)
|
|
||||||
target_link_libraries(kdeui PRIVATE ${XCB_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_target_properties(kdeui PROPERTIES
|
set_target_properties(kdeui PROPERTIES
|
||||||
VERSION ${GENERIC_LIB_VERSION}
|
VERSION ${GENERIC_LIB_VERSION}
|
||||||
SOVERSION ${GENERIC_LIB_SOVERSION}
|
SOVERSION ${GENERIC_LIB_SOVERSION}
|
||||||
|
|
|
@ -106,8 +106,8 @@ public:
|
||||||
int xfixesEventBase;
|
int xfixesEventBase;
|
||||||
bool mapViewport();
|
bool mapViewport();
|
||||||
|
|
||||||
void addClient(xcb_window_t);
|
void addClient(Window);
|
||||||
void removeClient(xcb_window_t);
|
void removeClient(Window);
|
||||||
|
|
||||||
bool x11Event( XEvent * ev );
|
bool x11Event( XEvent * ev );
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ void KWindowSystemPrivate::updateStackingOrder()
|
||||||
stackingOrder.append( clientListStacking()[i] );
|
stackingOrder.append( clientListStacking()[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWindowSystemPrivate::addClient(xcb_window_t w)
|
void KWindowSystemPrivate::addClient(Window w)
|
||||||
{
|
{
|
||||||
KWindowSystem* s_q = KWindowSystem::self();
|
KWindowSystem* s_q = KWindowSystem::self();
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ void KWindowSystemPrivate::addClient(xcb_window_t w)
|
||||||
emit s_q->strutChanged();
|
emit s_q->strutChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWindowSystemPrivate::removeClient(xcb_window_t w)
|
void KWindowSystemPrivate::removeClient(Window w)
|
||||||
{
|
{
|
||||||
KWindowSystem* s_q = KWindowSystem::self();
|
KWindowSystem* s_q = KWindowSystem::self();
|
||||||
|
|
||||||
|
|
|
@ -177,10 +177,10 @@ static char *nstrndup(const char *s1, int l) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static xcb_window_t *nwindup(const xcb_window_t *w1, int n) {
|
static Window *nwindup(const Window *w1, int n) {
|
||||||
if (! w1 || n == 0) return (xcb_window_t *) 0;
|
if (! w1 || n == 0) return (Window *) 0;
|
||||||
|
|
||||||
xcb_window_t *w2 = new xcb_window_t[n];
|
Window *w2 = new Window[n];
|
||||||
while (n--) w2[n] = w1[n];
|
while (n--) w2[n] = w1[n];
|
||||||
return w2;
|
return w2;
|
||||||
}
|
}
|
||||||
|
@ -242,9 +242,9 @@ static void refdec_nwi(NETWinInfoPrivate *p) {
|
||||||
|
|
||||||
|
|
||||||
static int wcmp(const void *a, const void *b) {
|
static int wcmp(const void *a, const void *b) {
|
||||||
if (*((xcb_window_t *) a) < *((xcb_window_t *) b))
|
if (*((Window *) a) < *((Window *) b))
|
||||||
return -1;
|
return -1;
|
||||||
else if (*((xcb_window_t *) a) > *((xcb_window_t *) b))
|
else if (*((Window *) a) > *((Window *) b))
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -463,7 +463,7 @@ static void create_netwm_atoms(Display *d) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void readIcon(Display* display, xcb_window_t window, Atom property, NETRArray<NETIcon>& icons, int& icon_count) {
|
static void readIcon(Display* display, Window window, Atom property, NETRArray<NETIcon>& icons, int& icon_count) {
|
||||||
|
|
||||||
#ifdef NETWMDEBUG
|
#ifdef NETWMDEBUG
|
||||||
fprintf(stderr, "NET: readIcon\n");
|
fprintf(stderr, "NET: readIcon\n");
|
||||||
|
@ -615,7 +615,7 @@ Z &NETRArray<Z>::operator[](int index) {
|
||||||
|
|
||||||
// Construct a new NETRootInfo object.
|
// Construct a new NETRootInfo object.
|
||||||
|
|
||||||
NETRootInfo::NETRootInfo(Display *display, xcb_window_t supportWindow, const char *wmName,
|
NETRootInfo::NETRootInfo(Display *display, Window supportWindow, const char *wmName,
|
||||||
const unsigned long properties[], int properties_size,
|
const unsigned long properties[], int properties_size,
|
||||||
int screen, bool doActivate)
|
int screen, bool doActivate)
|
||||||
{
|
{
|
||||||
|
@ -640,7 +640,7 @@ NETRootInfo::NETRootInfo(Display *display, xcb_window_t supportWindow, const cha
|
||||||
p->supportwindow = supportWindow;
|
p->supportwindow = supportWindow;
|
||||||
p->number_of_desktops = p->current_desktop = 0;
|
p->number_of_desktops = p->current_desktop = 0;
|
||||||
p->active = None;
|
p->active = None;
|
||||||
p->clients = p->stacking = p->virtual_roots = (xcb_window_t *) 0;
|
p->clients = p->stacking = p->virtual_roots = (Window *) 0;
|
||||||
p->clients_count = p->stacking_count = p->virtual_roots_count = 0;
|
p->clients_count = p->stacking_count = p->virtual_roots_count = 0;
|
||||||
p->showing_desktop = false;
|
p->showing_desktop = false;
|
||||||
p->desktop_layout_orientation = OrientationHorizontal;
|
p->desktop_layout_orientation = OrientationHorizontal;
|
||||||
|
@ -695,7 +695,7 @@ NETRootInfo::NETRootInfo(Display *display, const unsigned long properties[],
|
||||||
p->supportwindow = None;
|
p->supportwindow = None;
|
||||||
p->number_of_desktops = p->current_desktop = 0;
|
p->number_of_desktops = p->current_desktop = 0;
|
||||||
p->active = None;
|
p->active = None;
|
||||||
p->clients = p->stacking = p->virtual_roots = (xcb_window_t *) 0;
|
p->clients = p->stacking = p->virtual_roots = (Window *) 0;
|
||||||
p->clients_count = p->stacking_count = p->virtual_roots_count = 0;
|
p->clients_count = p->stacking_count = p->virtual_roots_count = 0;
|
||||||
p->showing_desktop = false;
|
p->showing_desktop = false;
|
||||||
p->desktop_layout_orientation = OrientationHorizontal;
|
p->desktop_layout_orientation = OrientationHorizontal;
|
||||||
|
@ -759,7 +759,7 @@ NETRootInfo::NETRootInfo(Display *display, unsigned long properties, int screen,
|
||||||
p->supportwindow = None;
|
p->supportwindow = None;
|
||||||
p->number_of_desktops = p->current_desktop = 0;
|
p->number_of_desktops = p->current_desktop = 0;
|
||||||
p->active = None;
|
p->active = None;
|
||||||
p->clients = p->stacking = p->virtual_roots = (xcb_window_t *) 0;
|
p->clients = p->stacking = p->virtual_roots = (Window *) 0;
|
||||||
p->clients_count = p->stacking_count = p->virtual_roots_count = 0;
|
p->clients_count = p->stacking_count = p->virtual_roots_count = 0;
|
||||||
p->showing_desktop = false;
|
p->showing_desktop = false;
|
||||||
p->desktop_layout_orientation = OrientationHorizontal;
|
p->desktop_layout_orientation = OrientationHorizontal;
|
||||||
|
@ -843,7 +843,7 @@ void NETRootInfo::activate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void NETRootInfo::setClientList(const xcb_window_t *windows, unsigned int count) {
|
void NETRootInfo::setClientList(const Window *windows, unsigned int count) {
|
||||||
if (p->role != WindowManager) return;
|
if (p->role != WindowManager) return;
|
||||||
|
|
||||||
p->clients_count = count;
|
p->clients_count = count;
|
||||||
|
@ -861,7 +861,7 @@ void NETRootInfo::setClientList(const xcb_window_t *windows, unsigned int count)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void NETRootInfo::setClientListStacking(const xcb_window_t *windows, unsigned int count) {
|
void NETRootInfo::setClientListStacking(const Window *windows, unsigned int count) {
|
||||||
if (p->role != WindowManager) return;
|
if (p->role != WindowManager) return;
|
||||||
|
|
||||||
p->stacking_count = count;
|
p->stacking_count = count;
|
||||||
|
@ -1517,12 +1517,12 @@ void NETRootInfo::updateSupportedProperties( Atom atom )
|
||||||
p->properties[ PROTOCOLS2 ] |= WM2KDEShadow;
|
p->properties[ PROTOCOLS2 ] |= WM2KDEShadow;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NETRootInfo::setActiveWindow(xcb_window_t window) {
|
void NETRootInfo::setActiveWindow(Window window) {
|
||||||
setActiveWindow( window, FromUnknown, QX11Info::appUserTime(), None );
|
setActiveWindow( window, FromUnknown, QX11Info::appUserTime(), None );
|
||||||
}
|
}
|
||||||
|
|
||||||
void NETRootInfo::setActiveWindow(xcb_window_t window, NET::RequestSource src,
|
void NETRootInfo::setActiveWindow(Window window, NET::RequestSource src,
|
||||||
xcb_timestamp_t timestamp, xcb_window_t active_window ) {
|
Time timestamp, Window active_window ) {
|
||||||
|
|
||||||
#ifdef NETWMDEBUG
|
#ifdef NETWMDEBUG
|
||||||
fprintf(stderr, "NETRootInfo::setActiveWindow(0x%lx) (%s)\n",
|
fprintf(stderr, "NETRootInfo::setActiveWindow(0x%lx) (%s)\n",
|
||||||
|
@ -1581,7 +1581,7 @@ void NETRootInfo::setWorkArea(int desktop, const NETRect &workarea) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void NETRootInfo::setVirtualRoots(const xcb_window_t *windows, unsigned int count) {
|
void NETRootInfo::setVirtualRoots(const Window *windows, unsigned int count) {
|
||||||
if (p->role != WindowManager) return;
|
if (p->role != WindowManager) return;
|
||||||
|
|
||||||
p->virtual_roots_count = count;
|
p->virtual_roots_count = count;
|
||||||
|
@ -1651,7 +1651,7 @@ bool NETRootInfo::showingDesktop() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void NETRootInfo::closeWindowRequest(xcb_window_t window) {
|
void NETRootInfo::closeWindowRequest(Window window) {
|
||||||
|
|
||||||
#ifdef NETWMDEBUG
|
#ifdef NETWMDEBUG
|
||||||
fprintf(stderr, "NETRootInfo::closeWindowRequest: requesting close for 0x%lx\n",
|
fprintf(stderr, "NETRootInfo::closeWindowRequest: requesting close for 0x%lx\n",
|
||||||
|
@ -1675,7 +1675,7 @@ void NETRootInfo::closeWindowRequest(xcb_window_t window) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void NETRootInfo::moveResizeRequest(xcb_window_t window, int x_root, int y_root,
|
void NETRootInfo::moveResizeRequest(Window window, int x_root, int y_root,
|
||||||
Direction direction)
|
Direction direction)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1700,7 +1700,7 @@ void NETRootInfo::moveResizeRequest(xcb_window_t window, int x_root, int y_root,
|
||||||
XSendEvent(p->display, p->root, False, netwm_sendevent_mask, &e);
|
XSendEvent(p->display, p->root, False, netwm_sendevent_mask, &e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NETRootInfo::moveResizeWindowRequest(xcb_window_t window, int flags, int x, int y, int width, int height )
|
void NETRootInfo::moveResizeWindowRequest(Window window, int flags, int x, int y, int width, int height )
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef NETWMDEBUG
|
#ifdef NETWMDEBUG
|
||||||
|
@ -1724,7 +1724,7 @@ void NETRootInfo::moveResizeWindowRequest(xcb_window_t window, int flags, int x,
|
||||||
XSendEvent(p->display, p->root, False, netwm_sendevent_mask, &e);
|
XSendEvent(p->display, p->root, False, netwm_sendevent_mask, &e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NETRootInfo::restackRequest(xcb_window_t window, RequestSource src, xcb_window_t above, int detail, xcb_timestamp_t timestamp )
|
void NETRootInfo::restackRequest(Window window, RequestSource src, Window above, int detail, Time timestamp )
|
||||||
{
|
{
|
||||||
#ifdef NETWMDEBUG
|
#ifdef NETWMDEBUG
|
||||||
fprintf(stderr, "NETRootInfo::restackRequest: requesting restack for 0x%lx (%lx, %d)\n",
|
fprintf(stderr, "NETRootInfo::restackRequest: requesting restack for 0x%lx (%lx, %d)\n",
|
||||||
|
@ -1747,7 +1747,7 @@ void NETRootInfo::restackRequest(xcb_window_t window, RequestSource src, xcb_win
|
||||||
XSendEvent(p->display, p->root, False, netwm_sendevent_mask, &e);
|
XSendEvent(p->display, p->root, False, netwm_sendevent_mask, &e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NETRootInfo::sendPing( xcb_window_t window, xcb_timestamp_t timestamp )
|
void NETRootInfo::sendPing( Window window, Time timestamp )
|
||||||
{
|
{
|
||||||
if (p->role != WindowManager) return;
|
if (p->role != WindowManager) return;
|
||||||
#ifdef NETWMDEBUG
|
#ifdef NETWMDEBUG
|
||||||
|
@ -1770,7 +1770,7 @@ void NETRootInfo::sendPing( xcb_window_t window, xcb_timestamp_t timestamp )
|
||||||
XSendEvent(p->display, window, False, 0, &e);
|
XSendEvent(p->display, window, False, 0, &e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NETRootInfo::takeActivity( xcb_window_t window, xcb_timestamp_t timestamp, long flags )
|
void NETRootInfo::takeActivity( Window window, Time timestamp, long flags )
|
||||||
{
|
{
|
||||||
if (p->role != WindowManager) return;
|
if (p->role != WindowManager) return;
|
||||||
#ifdef NETWMDEBUG
|
#ifdef NETWMDEBUG
|
||||||
|
@ -1891,8 +1891,8 @@ void NETRootInfo::event(XEvent *event, unsigned long* properties, int properties
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RequestSource src = FromUnknown;
|
RequestSource src = FromUnknown;
|
||||||
xcb_timestamp_t timestamp = CurrentTime;
|
Time timestamp = CurrentTime;
|
||||||
xcb_window_t active_window = None;
|
Window active_window = None;
|
||||||
// make sure there aren't unknown values
|
// make sure there aren't unknown values
|
||||||
if( event->xclient.data.l[0] >= FromUnknown
|
if( event->xclient.data.l[0] >= FromUnknown
|
||||||
&& event->xclient.data.l[0] <= FromTool )
|
&& event->xclient.data.l[0] <= FromTool )
|
||||||
|
@ -1953,7 +1953,7 @@ void NETRootInfo::event(XEvent *event, unsigned long* properties, int properties
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RequestSource src = FromUnknown;
|
RequestSource src = FromUnknown;
|
||||||
xcb_timestamp_t timestamp = CurrentTime;
|
Time timestamp = CurrentTime;
|
||||||
// make sure there aren't unknown values
|
// make sure there aren't unknown values
|
||||||
if( event->xclient.data.l[0] >= FromUnknown
|
if( event->xclient.data.l[0] >= FromUnknown
|
||||||
&& event->xclient.data.l[0] <= FromTool )
|
&& event->xclient.data.l[0] <= FromTool )
|
||||||
|
@ -2115,8 +2115,8 @@ void NETRootInfo::update( const unsigned long dirty_props[] )
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dirty & ClientList) {
|
if (dirty & ClientList) {
|
||||||
QList<xcb_window_t> clientsToRemove;
|
QList<Window> clientsToRemove;
|
||||||
QList<xcb_window_t> clientsToAdd;
|
QList<Window> clientsToAdd;
|
||||||
|
|
||||||
bool read_ok = false;
|
bool read_ok = false;
|
||||||
if (XGetWindowProperty(p->display, p->root, net_client_list,
|
if (XGetWindowProperty(p->display, p->root, net_client_list,
|
||||||
|
@ -2124,9 +2124,9 @@ void NETRootInfo::update( const unsigned long dirty_props[] )
|
||||||
&format_ret, &nitems_ret, &unused, &data_ret)
|
&format_ret, &nitems_ret, &unused, &data_ret)
|
||||||
== Success) {
|
== Success) {
|
||||||
if (type_ret == XA_WINDOW && format_ret == 32) {
|
if (type_ret == XA_WINDOW && format_ret == 32) {
|
||||||
xcb_window_t *wins = (xcb_window_t *) data_ret;
|
Window *wins = (Window *) data_ret;
|
||||||
|
|
||||||
qsort(wins, nitems_ret, sizeof(xcb_window_t), wcmp);
|
qsort(wins, nitems_ret, sizeof(Window), wcmp);
|
||||||
|
|
||||||
if (p->clients) {
|
if (p->clients) {
|
||||||
if (p->role == Client) {
|
if (p->role == Client) {
|
||||||
|
@ -2204,7 +2204,7 @@ void NETRootInfo::update( const unsigned long dirty_props[] )
|
||||||
&format_ret, &nitems_ret, &unused, &data_ret)
|
&format_ret, &nitems_ret, &unused, &data_ret)
|
||||||
== Success) {
|
== Success) {
|
||||||
if (type_ret == XA_WINDOW && format_ret == 32) {
|
if (type_ret == XA_WINDOW && format_ret == 32) {
|
||||||
xcb_window_t *wins = (xcb_window_t *) data_ret;
|
Window *wins = (Window *) data_ret;
|
||||||
|
|
||||||
p->stacking_count = nitems_ret;
|
p->stacking_count = nitems_ret;
|
||||||
p->stacking = nwindup(wins, p->stacking_count);
|
p->stacking = nwindup(wins, p->stacking_count);
|
||||||
|
@ -2353,7 +2353,7 @@ void NETRootInfo::update( const unsigned long dirty_props[] )
|
||||||
&nitems_ret, &unused, &data_ret)
|
&nitems_ret, &unused, &data_ret)
|
||||||
== Success) {
|
== Success) {
|
||||||
if (type_ret == XA_WINDOW && format_ret == 32 && nitems_ret == 1) {
|
if (type_ret == XA_WINDOW && format_ret == 32 && nitems_ret == 1) {
|
||||||
p->active = *((xcb_window_t *) data_ret);
|
p->active = *((Window *) data_ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NETWMDEBUG
|
#ifdef NETWMDEBUG
|
||||||
|
@ -2403,7 +2403,7 @@ void NETRootInfo::update( const unsigned long dirty_props[] )
|
||||||
&nitems_ret, &unused, &data_ret)
|
&nitems_ret, &unused, &data_ret)
|
||||||
== Success) {
|
== Success) {
|
||||||
if (type_ret == XA_WINDOW && format_ret == 32 && nitems_ret == 1) {
|
if (type_ret == XA_WINDOW && format_ret == 32 && nitems_ret == 1) {
|
||||||
p->supportwindow = *((xcb_window_t *) data_ret);
|
p->supportwindow = *((Window *) data_ret);
|
||||||
|
|
||||||
unsigned char *name_ret;
|
unsigned char *name_ret;
|
||||||
if (XGetWindowProperty(p->display, p->supportwindow,
|
if (XGetWindowProperty(p->display, p->supportwindow,
|
||||||
|
@ -2439,7 +2439,7 @@ void NETRootInfo::update( const unsigned long dirty_props[] )
|
||||||
&format_ret, &nitems_ret, &unused, &data_ret)
|
&format_ret, &nitems_ret, &unused, &data_ret)
|
||||||
== Success) {
|
== Success) {
|
||||||
if (type_ret == XA_WINDOW && format_ret == 32) {
|
if (type_ret == XA_WINDOW && format_ret == 32) {
|
||||||
xcb_window_t *wins = (xcb_window_t *) data_ret;
|
Window *wins = (Window *) data_ret;
|
||||||
|
|
||||||
p->virtual_roots_count = nitems_ret;
|
p->virtual_roots_count = nitems_ret;
|
||||||
p->virtual_roots = nwindup(wins, p->virtual_roots_count);
|
p->virtual_roots = nwindup(wins, p->virtual_roots_count);
|
||||||
|
@ -2512,12 +2512,12 @@ Display *NETRootInfo::x11Display() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
xcb_window_t NETRootInfo::rootWindow() const {
|
Window NETRootInfo::rootWindow() const {
|
||||||
return p->root;
|
return p->root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
xcb_window_t NETRootInfo::supportWindow() const {
|
Window NETRootInfo::supportWindow() const {
|
||||||
return p->supportwindow;
|
return p->supportwindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2627,7 +2627,7 @@ bool NETRootInfo::isSupported( NET::Action action ) const {
|
||||||
return p->properties[ ACTIONS ] & action;
|
return p->properties[ ACTIONS ] & action;
|
||||||
}
|
}
|
||||||
|
|
||||||
const xcb_window_t *NETRootInfo::clientList() const {
|
const Window *NETRootInfo::clientList() const {
|
||||||
return p->clients;
|
return p->clients;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2637,7 +2637,7 @@ int NETRootInfo::clientListCount() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const xcb_window_t *NETRootInfo::clientListStacking() const {
|
const Window *NETRootInfo::clientListStacking() const {
|
||||||
return p->stacking;
|
return p->stacking;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2681,7 +2681,7 @@ const char *NETRootInfo::desktopName(int desktop) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const xcb_window_t *NETRootInfo::virtualRoots( ) const {
|
const Window *NETRootInfo::virtualRoots( ) const {
|
||||||
return p->virtual_roots;
|
return p->virtual_roots;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2720,7 +2720,7 @@ int NETRootInfo::currentDesktop( bool ignore_viewport ) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
xcb_window_t NETRootInfo::activeWindow() const {
|
Window NETRootInfo::activeWindow() const {
|
||||||
return p->active;
|
return p->active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2729,7 +2729,7 @@ xcb_window_t NETRootInfo::activeWindow() const {
|
||||||
|
|
||||||
const int NETWinInfo::OnAllDesktops = NET::OnAllDesktops;
|
const int NETWinInfo::OnAllDesktops = NET::OnAllDesktops;
|
||||||
|
|
||||||
NETWinInfo::NETWinInfo(Display *display, xcb_window_t window, xcb_window_t rootWindow,
|
NETWinInfo::NETWinInfo(Display *display, Window window, Window rootWindow,
|
||||||
const unsigned long properties[], int properties_size,
|
const unsigned long properties[], int properties_size,
|
||||||
Role role)
|
Role role)
|
||||||
{
|
{
|
||||||
|
@ -2793,7 +2793,7 @@ NETWinInfo::NETWinInfo(Display *display, xcb_window_t window, xcb_window_t rootW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NETWinInfo::NETWinInfo(Display *display, xcb_window_t window, xcb_window_t rootWindow,
|
NETWinInfo::NETWinInfo(Display *display, Window window, Window rootWindow,
|
||||||
unsigned long properties, Role role)
|
unsigned long properties, Role role)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -3609,7 +3609,7 @@ NETIcon NETWinInfo::iconInternal(NETRArray<NETIcon>& icons, int icon_count, int
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NETWinInfo::setUserTime( xcb_timestamp_t time ) {
|
void NETWinInfo::setUserTime( Time time ) {
|
||||||
if (p->role != Client) return;
|
if (p->role != Client) return;
|
||||||
|
|
||||||
p->user_time = time;
|
p->user_time = time;
|
||||||
|
@ -4393,16 +4393,7 @@ void NETWinInfo::update(const unsigned long dirty_props[]) {
|
||||||
|
|
||||||
if (dirty2 & WM2TransientFor) {
|
if (dirty2 & WM2TransientFor) {
|
||||||
p->transient_for = None;
|
p->transient_for = None;
|
||||||
xcb_connection_t *c = xcb_connect(p->display->display_name, NULL);
|
XGetTransientForHint(p->display, p->window, &p->transient_for);
|
||||||
if(c) {
|
|
||||||
xcb_get_property_cookie_t cookie = xcb_get_property_unchecked(c, 0, p->window, XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 0, 1);
|
|
||||||
xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, NULL);
|
|
||||||
if(reply) {
|
|
||||||
p->transient_for = *reinterpret_cast<xcb_window_t *>(xcb_get_property_value(reply));
|
|
||||||
free(reply);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
xcb_disconnect(c);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dirty2 & WM2GroupLeader) {
|
if (dirty2 & WM2GroupLeader) {
|
||||||
|
@ -4555,7 +4546,7 @@ int NETWinInfo::pid() const {
|
||||||
return p->pid;
|
return p->pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
xcb_timestamp_t NETWinInfo::userTime() const {
|
Time NETWinInfo::userTime() const {
|
||||||
return p->user_time;
|
return p->user_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4575,11 +4566,11 @@ bool NETWinInfo::hasNETSupport() const {
|
||||||
return p->has_net_support;
|
return p->has_net_support;
|
||||||
}
|
}
|
||||||
|
|
||||||
xcb_window_t NETWinInfo::transientFor() const {
|
Window NETWinInfo::transientFor() const {
|
||||||
return p->transient_for;
|
return p->transient_for;
|
||||||
}
|
}
|
||||||
|
|
||||||
xcb_window_t NETWinInfo::groupLeader() const {
|
Window NETWinInfo::groupLeader() const {
|
||||||
return p->window_group;
|
return p->window_group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <xcb/xcb.h>
|
|
||||||
#include <fixx11h.h>
|
#include <fixx11h.h>
|
||||||
|
|
||||||
#include "netwm_def.h"
|
#include "netwm_def.h"
|
||||||
|
@ -102,7 +101,7 @@ public:
|
||||||
|
|
||||||
@param doActivate true to activate the window
|
@param doActivate true to activate the window
|
||||||
**/
|
**/
|
||||||
NETRootInfo(Display *display, xcb_window_t supportWindow, const char *wmName,
|
NETRootInfo(Display *display, Window supportWindow, const char *wmName,
|
||||||
const unsigned long properties[], int properties_size,
|
const unsigned long properties[], int properties_size,
|
||||||
int screen = -1, bool doActivate = true);
|
int screen = -1, bool doActivate = true);
|
||||||
|
|
||||||
|
@ -164,14 +163,14 @@ public:
|
||||||
|
|
||||||
@return the id of the root window
|
@return the id of the root window
|
||||||
**/
|
**/
|
||||||
xcb_window_t rootWindow() const;
|
Window rootWindow() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the Window id of the supportWindow.
|
Returns the Window id of the supportWindow.
|
||||||
|
|
||||||
@return the id of the support window
|
@return the id of the support window
|
||||||
**/
|
**/
|
||||||
xcb_window_t supportWindow() const;
|
Window supportWindow() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the name of the Window Manager.
|
Returns the name of the Window Manager.
|
||||||
|
@ -268,7 +267,7 @@ public:
|
||||||
|
|
||||||
@see clientListCount()
|
@see clientListCount()
|
||||||
**/
|
**/
|
||||||
const xcb_window_t *clientList() const;
|
const Window *clientList() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the number of managed windows in clientList array.
|
Returns the number of managed windows in clientList array.
|
||||||
|
@ -287,7 +286,7 @@ public:
|
||||||
|
|
||||||
@see clientListStackingCount()
|
@see clientListStackingCount()
|
||||||
**/
|
**/
|
||||||
const xcb_window_t *clientListStacking() const;
|
const Window *clientListStacking() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the number of managed windows in the clientListStacking array.
|
Returns the number of managed windows in the clientListStacking array.
|
||||||
|
@ -352,7 +351,7 @@ public:
|
||||||
|
|
||||||
@see virtualRootsCount()
|
@see virtualRootsCount()
|
||||||
**/
|
**/
|
||||||
const xcb_window_t *virtualRoots( ) const;
|
const Window *virtualRoots( ) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the number of window in the virtualRoots array.
|
Returns the number of window in the virtualRoots array.
|
||||||
|
@ -410,7 +409,7 @@ public:
|
||||||
|
|
||||||
@return the id of the active window
|
@return the id of the active window
|
||||||
**/
|
**/
|
||||||
xcb_window_t activeWindow() const;
|
Window activeWindow() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Window Managers must call this after creating the NETRootInfo object, and
|
Window Managers must call this after creating the NETRootInfo object, and
|
||||||
|
@ -429,7 +428,7 @@ public:
|
||||||
|
|
||||||
@param count The number of windows in the array
|
@param count The number of windows in the array
|
||||||
**/
|
**/
|
||||||
void setClientList(const xcb_window_t *windows, unsigned int count);
|
void setClientList(const Window *windows, unsigned int count);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the list of managed windows in stacking order on the Root/Desktop
|
Sets the list of managed windows in stacking order on the Root/Desktop
|
||||||
|
@ -439,7 +438,7 @@ public:
|
||||||
|
|
||||||
@param count The number of windows in the array.
|
@param count The number of windows in the array.
|
||||||
**/
|
**/
|
||||||
void setClientListStacking(const xcb_window_t *windows, unsigned int count);
|
void setClientListStacking(const Window *windows, unsigned int count);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the current desktop to the specified desktop.
|
Sets the current desktop to the specified desktop.
|
||||||
|
@ -516,8 +515,8 @@ public:
|
||||||
caused the request
|
caused the request
|
||||||
@param active_window active window of the requesting application, if any
|
@param active_window active window of the requesting application, if any
|
||||||
**/
|
**/
|
||||||
void setActiveWindow(xcb_window_t window, NET::RequestSource src,
|
void setActiveWindow(Window window, NET::RequestSource src,
|
||||||
xcb_timestamp_t timestamp, xcb_window_t active_window);
|
Time timestamp, Window active_window);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the active (focused) window the specified window. This should
|
Sets the active (focused) window the specified window. This should
|
||||||
|
@ -525,7 +524,7 @@ public:
|
||||||
|
|
||||||
@param window the if of the new active window
|
@param window the if of the new active window
|
||||||
**/
|
**/
|
||||||
void setActiveWindow(xcb_window_t window);
|
void setActiveWindow(Window window);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the workarea for the specified desktop
|
Sets the workarea for the specified desktop
|
||||||
|
@ -543,7 +542,7 @@ public:
|
||||||
|
|
||||||
@param count The number of windows in the array.
|
@param count The number of windows in the array.
|
||||||
**/
|
**/
|
||||||
void setVirtualRoots(const xcb_window_t *windows, unsigned int count);
|
void setVirtualRoots(const Window *windows, unsigned int count);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the desktop layout. This is set by the pager. When setting, the pager must
|
Sets the desktop layout. This is set by the pager. When setting, the pager must
|
||||||
|
@ -574,7 +573,7 @@ public:
|
||||||
|
|
||||||
@param window the id of the window to close
|
@param window the id of the window to close
|
||||||
**/
|
**/
|
||||||
void closeWindowRequest(xcb_window_t window);
|
void closeWindowRequest(Window window);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Clients (such as pagers/taskbars) that wish to start a WMMoveResize
|
Clients (such as pagers/taskbars) that wish to start a WMMoveResize
|
||||||
|
@ -591,7 +590,7 @@ public:
|
||||||
@param direction One of NET::Direction (see base class documentation for
|
@param direction One of NET::Direction (see base class documentation for
|
||||||
a description of the different directions).
|
a description of the different directions).
|
||||||
**/
|
**/
|
||||||
void moveResizeRequest(xcb_window_t window, int x_root, int y_root,
|
void moveResizeRequest(Window window, int x_root, int y_root,
|
||||||
Direction direction);
|
Direction direction);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -607,18 +606,18 @@ public:
|
||||||
@param width Requested width for the window
|
@param width Requested width for the window
|
||||||
@param height Requested height for the window
|
@param height Requested height for the window
|
||||||
**/
|
**/
|
||||||
void moveResizeWindowRequest(xcb_window_t window, int flags, int x, int y, int width, int height );
|
void moveResizeWindowRequest(Window window, int flags, int x, int y, int width, int height );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sends the _NET_RESTACK_WINDOW request.
|
Sends the _NET_RESTACK_WINDOW request.
|
||||||
**/
|
**/
|
||||||
void restackRequest(xcb_window_t window, RequestSource source, xcb_window_t above, int detail, xcb_timestamp_t timestamp);
|
void restackRequest(Window window, RequestSource source, Window above, int detail, Time timestamp);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sends a ping with the given timestamp to the window, using
|
Sends a ping with the given timestamp to the window, using
|
||||||
the _NET_WM_PING protocol.
|
the _NET_WM_PING protocol.
|
||||||
*/
|
*/
|
||||||
void sendPing( xcb_window_t window, xcb_timestamp_t timestamp );
|
void sendPing( Window window, Time timestamp );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sends a take activity message with the given timestamp to the window, using
|
Sends a take activity message with the given timestamp to the window, using
|
||||||
|
@ -627,7 +626,7 @@ public:
|
||||||
@param timestamp timestamp of the message
|
@param timestamp timestamp of the message
|
||||||
@param flags arbitrary flags
|
@param flags arbitrary flags
|
||||||
*/
|
*/
|
||||||
void takeActivity( xcb_window_t window, xcb_timestamp_t timestamp, long flags );
|
void takeActivity( Window window, Time timestamp, long flags );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function takes the passed XEvent and returns an OR'ed list of
|
This function takes the passed XEvent and returns an OR'ed list of
|
||||||
|
@ -666,7 +665,7 @@ protected:
|
||||||
|
|
||||||
@param window the id of the window to add
|
@param window the id of the window to add
|
||||||
**/
|
**/
|
||||||
virtual void addClient(xcb_window_t window) { Q_UNUSED(window); }
|
virtual void addClient(Window window) { Q_UNUSED(window); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A Client should subclass NETRootInfo and reimplement this function when
|
A Client should subclass NETRootInfo and reimplement this function when
|
||||||
|
@ -674,7 +673,7 @@ protected:
|
||||||
|
|
||||||
@param window the id of the window to remove
|
@param window the id of the window to remove
|
||||||
**/
|
**/
|
||||||
virtual void removeClient(xcb_window_t window) { Q_UNUSED(window); }
|
virtual void removeClient(Window window) { Q_UNUSED(window); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A Window Manager should subclass NETRootInfo and reimplement this function
|
A Window Manager should subclass NETRootInfo and reimplement this function
|
||||||
|
@ -722,7 +721,7 @@ protected:
|
||||||
|
|
||||||
@param window the id of the window to close
|
@param window the id of the window to close
|
||||||
**/
|
**/
|
||||||
virtual void closeWindow(xcb_window_t window) { Q_UNUSED(window); }
|
virtual void closeWindow(Window window) { Q_UNUSED(window); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A Window Manager should subclass NETRootInfo and reimplement this function
|
A Window Manager should subclass NETRootInfo and reimplement this function
|
||||||
|
@ -737,7 +736,7 @@ protected:
|
||||||
@param direction One of NET::Direction (see base class documentation for
|
@param direction One of NET::Direction (see base class documentation for
|
||||||
a description of the different directions).
|
a description of the different directions).
|
||||||
**/
|
**/
|
||||||
virtual void moveResize(xcb_window_t window, int x_root, int y_root,
|
virtual void moveResize(Window window, int x_root, int y_root,
|
||||||
unsigned long direction) { Q_UNUSED(window); Q_UNUSED(x_root); Q_UNUSED(y_root); Q_UNUSED(direction); }
|
unsigned long direction) { Q_UNUSED(window); Q_UNUSED(x_root); Q_UNUSED(y_root); Q_UNUSED(direction); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -746,7 +745,7 @@ protected:
|
||||||
@param window the window from which the reply came
|
@param window the window from which the reply came
|
||||||
@param timestamp timestamp of the ping
|
@param timestamp timestamp of the ping
|
||||||
*/
|
*/
|
||||||
virtual void gotPing( xcb_window_t window, xcb_timestamp_t timestamp ) { Q_UNUSED(window); Q_UNUSED(timestamp); }
|
virtual void gotPing( Window window, Time timestamp ) { Q_UNUSED(window); Q_UNUSED(timestamp); }
|
||||||
/**
|
/**
|
||||||
A Window Manager should subclass NETRootInfo and reimplement this function
|
A Window Manager should subclass NETRootInfo and reimplement this function
|
||||||
when it wants to know when a Client made a request to change the active
|
when it wants to know when a Client made a request to change the active
|
||||||
|
@ -757,8 +756,8 @@ protected:
|
||||||
@param timestamp the timestamp of the user action causing this request
|
@param timestamp the timestamp of the user action causing this request
|
||||||
@param active_window active window of the requesting application, if any
|
@param active_window active window of the requesting application, if any
|
||||||
**/
|
**/
|
||||||
virtual void changeActiveWindow(xcb_window_t window,NET::RequestSource src,
|
virtual void changeActiveWindow(Window window,NET::RequestSource src,
|
||||||
xcb_timestamp_t timestamp, xcb_window_t active_window ) { Q_UNUSED(window); Q_UNUSED(src); Q_UNUSED(timestamp); Q_UNUSED(active_window);}
|
Time timestamp, Window active_window ) { Q_UNUSED(window); Q_UNUSED(src); Q_UNUSED(timestamp); Q_UNUSED(active_window);}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A Window Manager should subclass NETRootInfo and reimplement this function
|
A Window Manager should subclass NETRootInfo and reimplement this function
|
||||||
|
@ -772,7 +771,7 @@ protected:
|
||||||
@param width Requested width for the window
|
@param width Requested width for the window
|
||||||
@param height Requested height for the window
|
@param height Requested height for the window
|
||||||
**/
|
**/
|
||||||
virtual void moveResizeWindow(xcb_window_t window, int flags, int x, int y, int width, int height) { Q_UNUSED(window); Q_UNUSED(flags); Q_UNUSED(x); Q_UNUSED(y); Q_UNUSED(width); Q_UNUSED(height); }
|
virtual void moveResizeWindow(Window window, int flags, int x, int y, int width, int height) { Q_UNUSED(window); Q_UNUSED(flags); Q_UNUSED(x); Q_UNUSED(y); Q_UNUSED(width); Q_UNUSED(height); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A Window Manager should subclass NETRootInfo and reimplement this function
|
A Window Manager should subclass NETRootInfo and reimplement this function
|
||||||
|
@ -785,8 +784,8 @@ protected:
|
||||||
@param detail restack detail
|
@param detail restack detail
|
||||||
@param timestamp the timestamp of the request
|
@param timestamp the timestamp of the request
|
||||||
**/
|
**/
|
||||||
virtual void restackWindow(xcb_window_t window, RequestSource source,
|
virtual void restackWindow(Window window, RequestSource source,
|
||||||
xcb_window_t above, int detail, xcb_timestamp_t timestamp) { Q_UNUSED(window); Q_UNUSED(source); Q_UNUSED(above); Q_UNUSED(detail); Q_UNUSED(timestamp); }
|
Window above, int detail, Time timestamp) { Q_UNUSED(window); Q_UNUSED(source); Q_UNUSED(above); Q_UNUSED(detail); Q_UNUSED(timestamp); }
|
||||||
/**
|
/**
|
||||||
A Window Manager should subclass NETRootInfo and reimplement this function
|
A Window Manager should subclass NETRootInfo and reimplement this function
|
||||||
when it wants to receive replies to the _NET_WM_TAKE_ACTIVITY protocol.
|
when it wants to receive replies to the _NET_WM_TAKE_ACTIVITY protocol.
|
||||||
|
@ -794,7 +793,7 @@ protected:
|
||||||
@param timestamp timestamp of the ping
|
@param timestamp timestamp of the ping
|
||||||
@param flags flags passed in the original message
|
@param flags flags passed in the original message
|
||||||
*/
|
*/
|
||||||
virtual void gotTakeActivity(xcb_window_t window, xcb_timestamp_t timestamp, long flags ) { Q_UNUSED(window); Q_UNUSED(timestamp); Q_UNUSED(flags); }
|
virtual void gotTakeActivity(Window window, Time timestamp, long flags ) { Q_UNUSED(window); Q_UNUSED(timestamp); Q_UNUSED(flags); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A Window Manager should subclass NETRootInfo and reimplement this function
|
A Window Manager should subclass NETRootInfo and reimplement this function
|
||||||
|
@ -858,7 +857,7 @@ public:
|
||||||
@param role Select the application role. If this argument is omitted,
|
@param role Select the application role. If this argument is omitted,
|
||||||
the role will default to Client.
|
the role will default to Client.
|
||||||
**/
|
**/
|
||||||
NETWinInfo(Display *display, xcb_window_t window, xcb_window_t rootWindow,
|
NETWinInfo(Display *display, Window window, Window rootWindow,
|
||||||
const unsigned long properties[], int properties_size,
|
const unsigned long properties[], int properties_size,
|
||||||
Role role = Client);
|
Role role = Client);
|
||||||
|
|
||||||
|
@ -868,8 +867,8 @@ public:
|
||||||
is equivalent to the first element of the properties array
|
is equivalent to the first element of the properties array
|
||||||
in the above constructor.
|
in the above constructor.
|
||||||
**/
|
**/
|
||||||
NETWinInfo(Display *display, xcb_window_t window,
|
NETWinInfo(Display *display, Window window,
|
||||||
xcb_window_t rootWindow, unsigned long properties,
|
Window rootWindow, unsigned long properties,
|
||||||
Role role = Client);
|
Role role = Client);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1200,12 +1199,12 @@ public:
|
||||||
* user action, it won't be activated after being shown, with the special
|
* user action, it won't be activated after being shown, with the special
|
||||||
* value 0 meaning not to activate the window after being shown.
|
* value 0 meaning not to activate the window after being shown.
|
||||||
*/
|
*/
|
||||||
void setUserTime( xcb_timestamp_t time );
|
void setUserTime( Time time );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the time of last user action on the window, or -1 if not set.
|
* Returns the time of last user action on the window, or -1 if not set.
|
||||||
*/
|
*/
|
||||||
xcb_timestamp_t userTime() const;
|
Time userTime() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the startup notification id @p id on the window.
|
* Sets the startup notification id @p id on the window.
|
||||||
|
@ -1241,12 +1240,12 @@ public:
|
||||||
* Returns the WM_TRANSIENT_FOR property for the window, i.e. the mainwindow
|
* Returns the WM_TRANSIENT_FOR property for the window, i.e. the mainwindow
|
||||||
* for this window.
|
* for this window.
|
||||||
*/
|
*/
|
||||||
xcb_window_t transientFor() const;
|
Window transientFor() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the leader window for the group the window is in, if any.
|
* Returns the leader window for the group the window is in, if any.
|
||||||
*/
|
*/
|
||||||
xcb_window_t groupLeader() const;
|
Window groupLeader() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the class component of the window class for the window
|
* Returns the class component of the window class for the window
|
||||||
|
|
|
@ -84,11 +84,10 @@ struct NETRootInfoPrivate {
|
||||||
NET::Role role;
|
NET::Role role;
|
||||||
|
|
||||||
// information about the X server
|
// information about the X server
|
||||||
xcb_connection_t *connection;
|
|
||||||
Display *display;
|
Display *display;
|
||||||
NETSize rootSize;
|
NETSize rootSize;
|
||||||
xcb_window_t root;
|
Window root;
|
||||||
xcb_window_t supportwindow;
|
Window supportwindow;
|
||||||
const char *name;
|
const char *name;
|
||||||
int screen;
|
int screen;
|
||||||
|
|
||||||
|
@ -97,8 +96,8 @@ struct NETRootInfoPrivate {
|
||||||
NETRArray<NETPoint> viewport;
|
NETRArray<NETPoint> viewport;
|
||||||
NETRArray<NETRect> workarea;
|
NETRArray<NETRect> workarea;
|
||||||
NETSize geometry;
|
NETSize geometry;
|
||||||
xcb_window_t active;
|
Window active;
|
||||||
xcb_window_t *clients, *stacking, *virtual_roots;
|
Window *clients, *stacking, *virtual_roots;
|
||||||
NETRArray<const char *> desktop_names;
|
NETRArray<const char *> desktop_names;
|
||||||
int number_of_desktops;
|
int number_of_desktops;
|
||||||
int current_desktop;
|
int current_desktop;
|
||||||
|
@ -124,9 +123,8 @@ struct NETRootInfoPrivate {
|
||||||
struct NETWinInfoPrivate {
|
struct NETWinInfoPrivate {
|
||||||
NET::Role role;
|
NET::Role role;
|
||||||
|
|
||||||
xcb_connection_t *connection;
|
|
||||||
Display *display;
|
Display *display;
|
||||||
xcb_window_t window, root;
|
Window window, root;
|
||||||
NET::MappingState mapping_state;
|
NET::MappingState mapping_state;
|
||||||
Bool mapping_state_dirty;
|
Bool mapping_state_dirty;
|
||||||
|
|
||||||
|
@ -148,7 +146,7 @@ struct NETWinInfoPrivate {
|
||||||
Time user_time;
|
Time user_time;
|
||||||
char* startup_id;
|
char* startup_id;
|
||||||
unsigned long opacity;
|
unsigned long opacity;
|
||||||
xcb_window_t transient_for, window_group;
|
Window transient_for, window_group;
|
||||||
unsigned long allowed_actions;
|
unsigned long allowed_actions;
|
||||||
char* class_class, *class_name, *window_role, *client_machine;
|
char* class_class, *class_name, *window_role, *client_machine;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue