mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-12-25 10:49:49 +01:00
minor fixes to window focusing
This commit is contained in:
parent
52d8b4fd91
commit
126c0ec934
2 changed files with 18 additions and 15 deletions
|
@ -43,7 +43,7 @@ void Events::setThread() {
|
|||
|
||||
// Start a GTK thread so that Cairo does not complain.
|
||||
|
||||
g_pWindowManager->barThread = g_thread_new("Bar", handle, nullptr);
|
||||
g_pWindowManager->barThread = g_thread_new("HyprST", handle, nullptr);
|
||||
|
||||
if (!g_pWindowManager->barThread) {
|
||||
Debug::log(ERR, "Gthread failed!");
|
||||
|
|
|
@ -432,25 +432,28 @@ void CWindowManager::setFocusedWindow(xcb_drawable_t window) {
|
|||
}
|
||||
|
||||
float values[1];
|
||||
if (g_pWindowManager->getWindowFromDrawable(window) && g_pWindowManager->getWindowFromDrawable(window)->getIsFloating()) {
|
||||
values[0] = XCB_STACK_MODE_ABOVE;
|
||||
xcb_configure_window(g_pWindowManager->DisplayConnection, window, XCB_CONFIG_WINDOW_STACK_MODE, values);
|
||||
}
|
||||
if (g_pWindowManager->getWindowFromDrawable(window)) {
|
||||
if (g_pWindowManager->getWindowFromDrawable(window)->getIsFloating()) {
|
||||
values[0] = XCB_STACK_MODE_ABOVE;
|
||||
xcb_configure_window(g_pWindowManager->DisplayConnection, window, XCB_CONFIG_WINDOW_STACK_MODE, values);
|
||||
}
|
||||
|
||||
// Apply rounded corners, does all the checks inside.
|
||||
// The border changed so let's not make it rectangular maybe
|
||||
applyShapeToWindow(g_pWindowManager->getWindowFromDrawable(window));
|
||||
// Apply rounded corners, does all the checks inside.
|
||||
// The border changed so let's not make it rectangular maybe
|
||||
applyShapeToWindow(g_pWindowManager->getWindowFromDrawable(window));
|
||||
}
|
||||
|
||||
LastWindow = window;
|
||||
|
||||
applyShapeToWindow(g_pWindowManager->getWindowFromDrawable(window));
|
||||
if (g_pWindowManager->getWindowFromDrawable(window))
|
||||
applyShapeToWindow(g_pWindowManager->getWindowFromDrawable(window));
|
||||
|
||||
// set focus in X11
|
||||
xcb_set_input_focus(DisplayConnection, XCB_INPUT_FOCUS_POINTER_ROOT, window, XCB_CURRENT_TIME);
|
||||
|
||||
// EWMH
|
||||
EWMH::updateCurrentWindow(window);
|
||||
}
|
||||
|
||||
// EWMH
|
||||
EWMH::updateCurrentWindow(window);
|
||||
|
||||
// set focus in X11
|
||||
xcb_set_input_focus(DisplayConnection, XCB_INPUT_FOCUS_POINTER_ROOT, window, XCB_CURRENT_TIME);
|
||||
}
|
||||
|
||||
// TODO: make this executed less. It's too often imo.
|
||||
|
|
Loading…
Reference in a new issue