mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-08 00:45:58 +01:00
Small Atom fixes
This commit is contained in:
parent
92d9a2556f
commit
a02646bd4b
2 changed files with 12 additions and 0 deletions
|
@ -143,6 +143,13 @@ void EWMH::updateWindow(xcb_window_t win) {
|
|||
if (!PWINDOW->getDock()) {
|
||||
long data[] = {XCB_ICCCM_WM_STATE_NORMAL, XCB_NONE};
|
||||
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, win, HYPRATOMS["WM_STATE"], HYPRATOMS["WM_STATE"], 32, 2, data);
|
||||
|
||||
if (PWINDOW->getDrawable() == g_pWindowManager->LastWindow) {
|
||||
uint32_t dataa[] = {HYPRATOMS["_NET_WM_STATE_FOCUSED"]};
|
||||
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_APPEND, PWINDOW->getDrawable(), HYPRATOMS["_NET_WM_STATE"], XCB_ATOM_ATOM, 32, 1, dataa);
|
||||
} else {
|
||||
removeAtom(PWINDOW->getDrawable(), HYPRATOMS["_NET_WM_STATE"], HYPRATOMS["_NET_WM_STATE_FOCUSED"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -566,6 +566,8 @@ void CWindowManager::setFocusedWindow(xcb_drawable_t window) {
|
|||
applyShapeToWindow(PWINDOW);
|
||||
}
|
||||
|
||||
const auto LASTWINID = LastWindow;
|
||||
|
||||
LastWindow = window;
|
||||
|
||||
if (PNEWFOCUS) {
|
||||
|
@ -580,6 +582,9 @@ void CWindowManager::setFocusedWindow(xcb_drawable_t window) {
|
|||
|
||||
// EWMH
|
||||
EWMH::updateCurrentWindow(window);
|
||||
|
||||
EWMH::updateWindow(window);
|
||||
EWMH::updateWindow(LASTWINID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue