mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-02 06:45:58 +01:00
make floating windows on top on each new window
This commit is contained in:
parent
fa221d5f05
commit
3a4c0e5bc6
3 changed files with 12 additions and 3 deletions
|
@ -128,9 +128,8 @@ CWindow* Events::remapWindow(int windowID, bool wasfloating) {
|
||||||
|
|
||||||
g_pWindowManager->setFocusedWindow(windowID);
|
g_pWindowManager->setFocusedWindow(windowID);
|
||||||
|
|
||||||
float values[1];
|
// Make all floating windows above
|
||||||
values[0] = XCB_STACK_MODE_BELOW;
|
g_pWindowManager->setAllFloatingWindowsTop();
|
||||||
xcb_configure_window(g_pWindowManager->DisplayConnection, windowID, XCB_CONFIG_WINDOW_STACK_MODE, values);
|
|
||||||
|
|
||||||
return g_pWindowManager->getWindowFromDrawable(windowID);
|
return g_pWindowManager->getWindowFromDrawable(windowID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -900,3 +900,12 @@ void CWindowManager::updateBarInfo() {
|
||||||
|
|
||||||
statusBar.setCurrentWorkspace(activeWorkspaces[getMonitorFromCursor()->ID]);
|
statusBar.setCurrentWorkspace(activeWorkspaces[getMonitorFromCursor()->ID]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CWindowManager::setAllFloatingWindowsTop() {
|
||||||
|
for (auto& window : windows) {
|
||||||
|
if (window.getIsFloating()) {
|
||||||
|
Values[0] = XCB_STACK_MODE_ABOVE;
|
||||||
|
xcb_configure_window(g_pWindowManager->DisplayConnection, window.getDrawable(), XCB_CONFIG_WINDOW_STACK_MODE, Values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -63,6 +63,7 @@ public:
|
||||||
bool isWorkspaceVisible(int workspaceID);
|
bool isWorkspaceVisible(int workspaceID);
|
||||||
|
|
||||||
void setAllWindowsDirty();
|
void setAllWindowsDirty();
|
||||||
|
void setAllFloatingWindowsTop();
|
||||||
|
|
||||||
SMonitor* getMonitorFromWindow(CWindow*);
|
SMonitor* getMonitorFromWindow(CWindow*);
|
||||||
SMonitor* getMonitorFromCursor();
|
SMonitor* getMonitorFromCursor();
|
||||||
|
|
Loading…
Reference in a new issue