[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kwin
From: Fredrik Höglund <fredrik () kde ! org>
Date: 2003-12-11 17:41:47
[Download RAW message or body]
CVS commit by fredrik:
Make sure that the right visual is used for the frame when embedding
an ARGB window.
Reviewed by Seli and Keith Packard.
M +1 -1 client.h 1.129
M +15 -6 manage.cpp 2.24
--- kdebase/kwin/client.h #1.128:1.129
@@ -358,5 +358,5 @@ class Client : public QObject, public KD
void updateUrgency();
- void embedClient( Window w );
+ void embedClient( Window w, const XWindowAttributes &attr );
void detectNoBorder();
void destroyDecoration();
--- kdebase/kwin/manage.cpp #2.23:2.24
@@ -45,5 +45,5 @@ bool Client::manage( Window w, bool isMa
block_geometry = 1;
- embedClient( w );
+ embedClient( w, attr );
// SELI order all these things in some sane manner
@@ -495,5 +495,5 @@ bool Client::manage( Window w, bool isMa
// called only from manage()
-void Client::embedClient( Window w )
+void Client::embedClient( Window w, const XWindowAttributes &attr )
{
assert( client == None );
@@ -508,6 +508,17 @@ void Client::embedClient( Window w )
wc.border_width = 0; // TODO possibly save this, and also use it for initial \
configuring of the window XConfigureWindow( qt_xdisplay(), client, CWBorderWidth, \
&wc );
- frame = XCreateSimpleWindow( qt_xdisplay(), qt_xrootwin(), 0, 0, 1, 1, 0, 0, 0 \
);
- wrapper = XCreateSimpleWindow( qt_xdisplay(), frame, 0, 0, 1, 1, 0, 0, 0 );
+
+ XSetWindowAttributes swa;
+ swa.colormap = attr.colormap;
+ swa.background_pixmap = None;
+ swa.border_pixel = 0;
+
+ frame = XCreateWindow( qt_xdisplay(), qt_xrootwin(), 0, 0, 1, 1, 0,
+ attr.depth, InputOutput, attr.visual,
+ CWColormap | CWBackPixmap | CWBorderPixel, &swa );
+ wrapper = XCreateWindow( qt_xdisplay(), frame, 0, 0, 1, 1, 0,
+ attr.depth, InputOutput, attr.visual,
+ CWColormap | CWBackPixmap | CWBorderPixel, &swa );
+
XDefineCursor( qt_xdisplay(), frame, arrowCursor.handle());
// some apps are stupid and don't define their own cursor - set the arrow one \
for them @@ -534,6 +545,4 @@ void Client::embedClient( Window w )
KeyPressMask | KeyReleaseMask
);
- XSetWindowBackgroundPixmap( qt_xdisplay(), frameId(), None );
- XSetWindowBackgroundPixmap( qt_xdisplay(), wrapperId(), None );
updateMouseGrab();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic