… | |
… | |
1461 | if (ev.xconfigure.window == parent) |
1461 | if (ev.xconfigure.window == parent) |
1462 | { |
1462 | { |
1463 | while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev)) |
1463 | while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev)) |
1464 | ; |
1464 | ; |
1465 | |
1465 | |
|
|
1466 | bool want_position_change = SHOULD_INVOKE (HOOK_POSITION_CHANGE); |
|
|
1467 | |
1466 | #ifdef HAVE_BG_PIXMAP |
1468 | #ifdef HAVE_BG_PIXMAP |
|
|
1469 | if (bg_window_position_sensitive ()) |
|
|
1470 | want_position_change = true; |
|
|
1471 | #endif |
|
|
1472 | |
1467 | bool moved = false; |
1473 | bool moved = false; |
1468 | if (bg_window_position_sensitive ()) |
1474 | |
|
|
1475 | if (want_position_change) |
1469 | { |
1476 | { |
1470 | int x, y; |
1477 | int x, y; |
|
|
1478 | |
1471 | if (ev.xconfigure.send_event) |
1479 | if (ev.xconfigure.send_event) |
1472 | { |
1480 | { |
1473 | x = ev.xconfigure.x; |
1481 | x = ev.xconfigure.x; |
1474 | y = ev.xconfigure.y; |
1482 | y = ev.xconfigure.y; |
1475 | } |
1483 | } |
1476 | else |
1484 | else |
1477 | get_window_origin (x, y); |
1485 | get_window_origin (x, y); |
1478 | |
1486 | |
|
|
1487 | if (x != parent_x || y != parent_y) |
|
|
1488 | { |
|
|
1489 | HOOK_INVOKE ((this, HOOK_POSITION_CHANGE, DT_INT, x, DT_INT, y, DT_END)); |
|
|
1490 | parent_x = x; |
|
|
1491 | parent_y = y; |
|
|
1492 | } |
|
|
1493 | |
1479 | if (bg_set_position (x, y) |
1494 | if (bg_set_position (x, y) |
1480 | || !(bg_flags & BG_IS_VALID)) |
1495 | || !(bg_flags & BG_IS_VALID)) |
1481 | moved = true; |
1496 | moved = true; |
1482 | } |
1497 | } |
1483 | #endif |
|
|
1484 | |
1498 | |
1485 | if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) |
1499 | if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) |
1486 | { |
1500 | { |
1487 | seen_resize = 1; |
1501 | seen_resize = 1; |
1488 | resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); |
1502 | resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); |
… | |
… | |
1830 | |
1844 | |
1831 | if (SHOULD_INVOKE (HOOK_ROOT_EVENT) |
1845 | if (SHOULD_INVOKE (HOOK_ROOT_EVENT) |
1832 | && HOOK_INVOKE ((this, HOOK_ROOT_EVENT, DT_XEVENT, &ev, DT_END))) |
1846 | && HOOK_INVOKE ((this, HOOK_ROOT_EVENT, DT_XEVENT, &ev, DT_END))) |
1833 | return; |
1847 | return; |
1834 | |
1848 | |
1835 | # if ENABLE_TRANSPARENCY |
|
|
1836 | switch (ev.type) |
1849 | switch (ev.type) |
1837 | { |
1850 | { |
1838 | case PropertyNotify: |
1851 | case PropertyNotify: |
1839 | /* |
1852 | /* |
1840 | * if user used some Esetroot compatible prog to set the root bg, |
1853 | * if user used some Esetroot compatible prog to set the root bg, |
1841 | * use the property to determine the pixmap. We use it later on. |
1854 | * use the property to determine the pixmap. We use it later on. |
1842 | */ |
1855 | */ |
1843 | if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID] |
1856 | if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID] |
1844 | || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID]) |
1857 | || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID]) |
1845 | { |
1858 | { |
|
|
1859 | # if ENABLE_TRANSPARENCY |
1846 | bg_set_root_pixmap (); |
1860 | bg_set_root_pixmap (); |
1847 | update_background (); |
1861 | update_background (); |
|
|
1862 | #endif |
|
|
1863 | #if ENABLE_PERL |
|
|
1864 | HOOK_INVOKE ((this, HOOK_ROOTPMAP_CHANGE, DT_END)); |
|
|
1865 | #endif |
1848 | } |
1866 | } |
1849 | |
1867 | |
1850 | break; |
1868 | break; |
1851 | } |
1869 | } |
1852 | # endif |
|
|
1853 | |
1870 | |
1854 | refresh_check (); |
1871 | refresh_check (); |
1855 | } |
1872 | } |
1856 | #endif |
1873 | #endif |
1857 | |
1874 | |