… | |
… | |
1436 | if (ev.xconfigure.window == parent[0]) |
1436 | if (ev.xconfigure.window == parent[0]) |
1437 | { |
1437 | { |
1438 | while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev)) |
1438 | while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev)) |
1439 | ; |
1439 | ; |
1440 | |
1440 | |
|
|
1441 | #ifdef HAVE_BG_PIXMAP |
|
|
1442 | bool moved = false; |
|
|
1443 | if (bgPixmap.window_position_sensitive ()) |
|
|
1444 | { |
|
|
1445 | int x, y; |
|
|
1446 | if (ev.xconfigure.send_event) |
|
|
1447 | { |
|
|
1448 | x = ev.xconfigure.x; |
|
|
1449 | y = ev.xconfigure.y; |
|
|
1450 | } |
|
|
1451 | else |
|
|
1452 | get_window_origin (x, y); |
|
|
1453 | |
|
|
1454 | if (bgPixmap.set_position (x, y) |
|
|
1455 | || (bgPixmap.flags & bgPixmap_t::isInvalid)) |
|
|
1456 | moved = true; |
|
|
1457 | } |
|
|
1458 | #endif |
|
|
1459 | |
1441 | if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) |
1460 | if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) |
1442 | { |
1461 | { |
1443 | seen_resize = 1; |
1462 | seen_resize = 1; |
1444 | resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); |
1463 | resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); |
1445 | } |
1464 | } |
1446 | else |
1465 | else |
1447 | { |
1466 | { |
1448 | #ifdef HAVE_BG_PIXMAP |
1467 | #ifdef HAVE_BG_PIXMAP |
1449 | if (bgPixmap.window_position_sensitive ()) |
1468 | if (moved) |
1450 | { |
1469 | { |
1451 | if (mapped) |
1470 | if (mapped) |
1452 | update_background (); |
1471 | update_background (); |
1453 | else |
1472 | else |
1454 | bgPixmap.invalidate (); |
1473 | bgPixmap.invalidate (); |
… | |
… | |
3448 | { |
3467 | { |
3449 | int changed = 0; |
3468 | int changed = 0; |
3450 | |
3469 | |
3451 | if (*str != ';') |
3470 | if (*str != ';') |
3452 | { |
3471 | { |
3453 | /* reset to default scaling :*/ |
|
|
3454 | bgPixmap.unset_geometry (); |
|
|
3455 | if (bgPixmap.set_file (str)) /* change pixmap */ |
3472 | if (bgPixmap.set_file (str)) /* change pixmap */ |
|
|
3473 | { |
3456 | changed++; |
3474 | changed++; |
3457 | str = strchr (str, ';'); |
3475 | str = strchr (str, ';'); |
3458 | if (str == NULL) |
3476 | if (str == NULL) |
3459 | bgPixmap.set_defaultGeometry (); |
3477 | bgPixmap.set_defaultGeometry (); |
|
|
3478 | else |
|
|
3479 | bgPixmap.set_geometry (str+1); |
|
|
3480 | } |
3460 | } |
3481 | } |
3461 | |
3482 | else |
3462 | while (str) |
|
|
3463 | { |
3483 | { |
3464 | str++; |
3484 | str++; |
3465 | if (bgPixmap.set_geometry (str)) |
3485 | if (bgPixmap.set_geometry (str, true)) |
3466 | changed++; |
3486 | changed++; |
3467 | str = strchr (str, ';'); |
|
|
3468 | } |
3487 | } |
3469 | |
3488 | |
3470 | if (changed) |
3489 | if (changed) |
|
|
3490 | { |
|
|
3491 | if (bgPixmap.window_position_sensitive ()) |
|
|
3492 | { |
|
|
3493 | int x, y; |
|
|
3494 | get_window_origin (x, y); |
|
|
3495 | bgPixmap.set_position (x, y); |
|
|
3496 | } |
3471 | update_background (); |
3497 | update_background (); |
|
|
3498 | } |
3472 | } |
3499 | } |
3473 | break; |
3500 | break; |
3474 | #endif |
3501 | #endif |
3475 | |
3502 | |
3476 | case XTerm_logfile: |
3503 | case XTerm_logfile: |