Changeset View
Changeset View
Standalone View
Standalone View
geometry.cpp
Show First 20 Lines • Show All 888 Lines • ▼ Show 20 Line(s) | 888 | else | |||
---|---|---|---|---|---|
889 | --block_focus; | 889 | --block_focus; | ||
890 | } | 890 | } | ||
891 | 891 | | |||
892 | // When kwin crashes, windows will not be gravitated back to their original position | 892 | // When kwin crashes, windows will not be gravitated back to their original position | ||
893 | // and will remain offset by the size of the decoration. So when restarting, fix this | 893 | // and will remain offset by the size of the decoration. So when restarting, fix this | ||
894 | // (the property with the size of the frame remains on the window after the crash). | 894 | // (the property with the size of the frame remains on the window after the crash). | ||
895 | void Workspace::fixPositionAfterCrash(xcb_window_t w, const xcb_get_geometry_reply_t *geometry) | 895 | void Workspace::fixPositionAfterCrash(xcb_window_t w, const xcb_get_geometry_reply_t *geometry) | ||
896 | { | 896 | { | ||
897 | NETWinInfo i(connection(), w, rootWindow(), NET::WMFrameExtents, nullptr); | 897 | NETWinInfo i(connection(), w, rootWindow(), NET::WMFrameExtents, NET::Properties2()); | ||
898 | NETStrut frame = i.frameExtents(); | 898 | NETStrut frame = i.frameExtents(); | ||
899 | 899 | | |||
900 | if (frame.left != 0 || frame.top != 0) { | 900 | if (frame.left != 0 || frame.top != 0) { | ||
901 | // left and top needed due to narrowing conversations restrictions in C++11 | 901 | // left and top needed due to narrowing conversations restrictions in C++11 | ||
902 | const uint32_t left = frame.left; | 902 | const uint32_t left = frame.left; | ||
903 | const uint32_t top = frame.top; | 903 | const uint32_t top = frame.top; | ||
904 | const uint32_t values[] = { geometry->x - left, geometry->y - top }; | 904 | const uint32_t values[] = { geometry->x - left, geometry->y - top }; | ||
905 | xcb_configure_window(connection(), w, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y, values); | 905 | xcb_configure_window(connection(), w, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y, values); | ||
▲ Show 20 Lines • Show All 2491 Lines • Show Last 20 Lines |