336 |
|
XSetWindowAttributes wattr; |
337 |
|
wattr.event_mask = eventmask = win_eventmask; |
338 |
|
wattr.background_pixel = black_pixel; |
339 |
– |
wattr.border_pixel = black_pixel; |
340 |
– |
wattr.backing_store = NotUseful; |
341 |
– |
wattr.save_under = false; |
342 |
– |
wattr.backing_planes = xdepth; |
339 |
|
|
340 |
|
XSync(x_display, false); |
341 |
|
the_win = XCreateWindow(x_display, rootwin, 0, 0, width, height, 0, xdepth, |
342 |
< |
InputOutput, vis, CWEventMask | CWBackPixel | CWBorderPixel | |
347 |
< |
CWBackingStore | CWBackingPlanes, &wattr); |
342 |
> |
InputOutput, vis, CWEventMask | CWBackPixel, &wattr); |
343 |
|
|
344 |
|
// Indicate that we want keyboard input |
345 |
|
{ |
367 |
|
} |
368 |
|
|
369 |
|
// Set window title |
370 |
< |
{ |
376 |
< |
XTextProperty title_prop; |
377 |
< |
const char *title = GetString(STR_WINDOW_TITLE); |
378 |
< |
XStringListToTextProperty((char **)&title, 1, &title_prop); |
379 |
< |
XSetWMName(x_display, the_win, &title_prop); |
380 |
< |
XFree(title_prop.value); |
381 |
< |
} |
370 |
> |
XStoreName(x_display, the_win, GetString(STR_WINDOW_TITLE)); |
371 |
|
|
372 |
|
// Set window class |
373 |
|
{ |
561 |
|
|
562 |
|
// Create window |
563 |
|
XSetWindowAttributes wattr; |
575 |
– |
wattr.override_redirect = True; |
576 |
– |
wattr.backing_store = NotUseful; |
577 |
– |
wattr.background_pixel = white_pixel; |
578 |
– |
wattr.border_pixel = black_pixel; |
564 |
|
wattr.event_mask = eventmask = dga_eventmask; |
565 |
+ |
wattr.background_pixel = white_pixel; |
566 |
+ |
wattr.override_redirect = True; |
567 |
|
|
568 |
|
XSync(x_display, false); |
569 |
|
the_win = XCreateWindow(x_display, rootwin, |
570 |
|
0, 0, width, height, |
571 |
|
0, xdepth, InputOutput, vis, |
572 |
< |
CWEventMask|CWBackPixel|CWBorderPixel|CWOverrideRedirect|CWBackingStore, |
572 |
> |
CWEventMask | CWBackPixel | CWOverrideRedirect, |
573 |
|
&wattr); |
574 |
|
XSync(x_display, false); |
575 |
|
XMapRaised(x_display, the_win); |
671 |
|
// Create window |
672 |
|
XSetWindowAttributes wattr; |
673 |
|
wattr.event_mask = eventmask = dga_eventmask; |
687 |
– |
wattr.border_pixel = black_pixel; |
674 |
|
wattr.override_redirect = True; |
675 |
|
|
676 |
|
XSync(x_display, false); |
677 |
|
the_win = XCreateWindow(x_display, rootwin, 0, 0, width, height, 0, xdepth, |
678 |
< |
InputOutput, vis, CWEventMask | CWBorderPixel | CWOverrideRedirect, &wattr); |
678 |
> |
InputOutput, vis, CWEventMask | CWOverrideRedirect, &wattr); |
679 |
|
XSync(x_display, false); |
680 |
|
XStoreName(x_display, the_win, GetString(STR_WINDOW_TITLE)); |
681 |
|
XMapRaised(x_display, the_win); |
1282 |
|
XSetWindowAttributes wattr; |
1283 |
|
wattr.event_mask = KeyPressMask; |
1284 |
|
wattr.background_pixel = black_pixel; |
1285 |
< |
wattr.border_pixel = black_pixel; |
1300 |
< |
wattr.backing_store = Always; |
1285 |
> |
wattr.backing_store = WhenMapped; |
1286 |
|
wattr.backing_planes = xdepth; |
1287 |
|
wattr.colormap = DefaultColormap(x_display, screen); |
1288 |
|
|
1289 |
|
XSync(x_display, false); |
1290 |
|
suspend_win = XCreateWindow(x_display, rootwin, 0, 0, 512, 1, 0, xdepth, |
1291 |
< |
InputOutput, vis, CWEventMask | CWBackPixel | CWBorderPixel | |
1292 |
< |
CWBackingStore | CWBackingPlanes | (xdepth == 8 ? CWColormap : 0), &wattr); |
1291 |
> |
InputOutput, vis, CWEventMask | CWBackPixel | CWBackingStore | |
1292 |
> |
CWBackingPlanes | (xdepth == 8 ? CWColormap : 0), &wattr); |
1293 |
|
XSync(x_display, false); |
1294 |
|
XStoreName(x_display, suspend_win, GetString(STR_SUSPEND_WINDOW_TITLE)); |
1295 |
|
XMapRaised(x_display, suspend_win); |