- w = XCreateSimpleWindow ( QX11Info::display(), p, x(), y(), width(),
- height(), 0, xforeground, xbackground );
- }
- else if ( type == Type3D )
- {
- w = XCreateWindow( QX11Info::display(), p, x(), y(), width(), height(),
- 0, pVisualInfo->depth, InputOutput, pVisualInfo->visual,
- CWBackPixel | CWBorderPixel | CWColormap, &a );
- }
- else
- return;*/
- w = XCreateWindow( QX11Info::display(), p, x(), y(), width(), height(),
- 0, pVisualInfo->depth, InputOutput, pVisualInfo->visual,
- CWBackPixel | CWBorderPixel | CWColormap, &a );
-
- Window *cmw;
- Window *cmwret;
- int count;
- if ( XGetWMColormapWindows( QX11Info::display(), topLevelWidget()->winId(), &cmwret, &count ) )
- {
- cmw = new Window[count+1];
- memcpy( (char*)cmw, (char*)cmwret, sizeof(Window) * count );
- XFree( (char*)cmwret );
- int i;
-
- for ( i = 0; i < count; i++ )
- {
- if ( cmw[i] == winId() ) /* replace old window */
- {
- cmw[i] = w;
- break;
- }
- }
-
- if ( i >= count ) /* append new window */
- cmw[count++] = w;
- }
- else
- {
- count = 1;
- cmw = new Window[count];
- cmw[0] = w;
- }
-
- /* Creating new window (with good VisualID) for this widget */
- create(w);
- XSetWMColormapWindows( QX11Info::display(), topLevelWidget()->winId(), cmw, count );
- delete[] cmw;
-
- if ( isVisible() )
- show();
-
- if ( pVisualInfo )
+ w = XCreateSimpleWindow ( QX11Info::display(), p, x(), y(), width(),
+ height(), 0, xforeground, xbackground );
+ }
+ else if ( type == Type3D )
+ {
+ w = XCreateWindow( QX11Info::display(), p, x(), y(), width(), height(),
+ 0, pVisualInfo->depth, InputOutput, pVisualInfo->visual,
+ CWBackPixel | CWBorderPixel | CWColormap, &a );
+ }
+ else
+ return;
+ */
+ w = XCreateWindow( QX11Info::display(), p, x(), y(), width(), height(),
+ 0, pVisualInfo->depth, InputOutput, pVisualInfo->visual,
+ CWBackPixel | CWBorderPixel | CWColormap, &a );
+
+ Window *cmw;
+ Window *cmwret;
+ int count;
+ if ( XGetWMColormapWindows( QX11Info::display(), topLevelWidget()->winId(), &cmwret, &count ) )
+ {
+ cmw = new Window[count+1];
+ memcpy( (char*)cmw, (char*)cmwret, sizeof(Window) * count );
+ XFree( (char*)cmwret );
+ int i;
+
+ for ( i = 0; i < count; i++ )
+ {
+ if ( cmw[i] == winId() ) /* replace old window */