mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-07 16:35:59 +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);
|
||||
|
||||
float values[1];
|
||||
values[0] = XCB_STACK_MODE_BELOW;
|
||||
xcb_configure_window(g_pWindowManager->DisplayConnection, windowID, XCB_CONFIG_WINDOW_STACK_MODE, values);
|
||||
// Make all floating windows above
|
||||
g_pWindowManager->setAllFloatingWindowsTop();
|
||||
|
||||
return g_pWindowManager->getWindowFromDrawable(windowID);
|
||||
}
|
||||
|
|
|
@ -900,3 +900,12 @@ void CWindowManager::updateBarInfo() {
|
|||
|
||||
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);
|
||||
|
||||
void setAllWindowsDirty();
|
||||
void setAllFloatingWindowsTop();
|
||||
|
||||
SMonitor* getMonitorFromWindow(CWindow*);
|
||||
SMonitor* getMonitorFromCursor();
|
||||
|
|
Loading…
Reference in a new issue