mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-29 08:05:58 +01:00
fix things in review
This commit is contained in:
parent
9c654f471d
commit
fed9b8ca04
3 changed files with 14 additions and 3 deletions
|
@ -318,6 +318,7 @@ void parseLine(std::string& line) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigManager::loadConfigLoadVars() {
|
void ConfigManager::loadConfigLoadVars() {
|
||||||
|
const auto ORIGBORDERSIZE = ConfigManager::getInt("border_size");
|
||||||
Debug::log(LOG, "Reloading the config!");
|
Debug::log(LOG, "Reloading the config!");
|
||||||
ConfigManager::parseError = ""; // reset the error
|
ConfigManager::parseError = ""; // reset the error
|
||||||
ConfigManager::currentCategory = ""; // reset the category
|
ConfigManager::currentCategory = ""; // reset the category
|
||||||
|
@ -402,6 +403,8 @@ void ConfigManager::loadConfigLoadVars() {
|
||||||
|
|
||||||
loadBar = true;
|
loadBar = true;
|
||||||
isFirstLaunch = false;
|
isFirstLaunch = false;
|
||||||
|
|
||||||
|
if (ORIGBORDERSIZE != ConfigManager::getInt("border_size")) EWMH::refreshAllExtents();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigManager::applyKeybindsToX() {
|
void ConfigManager::applyKeybindsToX() {
|
||||||
|
|
|
@ -54,7 +54,14 @@ void EWMH::updateClientList() {
|
||||||
32, windowsList.size(), ArrWindowList);
|
32, windowsList.size(), ArrWindowList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EWMH::refreshAllExtents() {
|
||||||
|
for (auto& w : g_pWindowManager->windows)
|
||||||
|
if (w.getDrawable() > 0)
|
||||||
|
setFrameExtents(w.getDrawable());
|
||||||
|
}
|
||||||
|
|
||||||
void EWMH::setFrameExtents(xcb_window_t w) {
|
void EWMH::setFrameExtents(xcb_window_t w) {
|
||||||
uint32_t extents[4] = {ConfigManager::getInt("border_size"), ConfigManager::getInt("border_size"), ConfigManager::getInt("border_size"), ConfigManager::getInt("border_size")};
|
const auto BORDERSIZE = ConfigManager::getInt("border_size");
|
||||||
|
uint32_t extents[4] = {BORDERSIZE,BORDERSIZE,BORDERSIZE,BORDERSIZE};
|
||||||
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, w, HYPRATOMS["_NET_FRAME_EXTENTS"], XCB_ATOM_CARDINAL, 32, 4, &extents);
|
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, w, HYPRATOMS["_NET_FRAME_EXTENTS"], XCB_ATOM_CARDINAL, 32, 4, &extents);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ namespace EWMH {
|
||||||
void updateCurrentWindow(xcb_window_t);
|
void updateCurrentWindow(xcb_window_t);
|
||||||
void updateClientList();
|
void updateClientList();
|
||||||
void setFrameExtents(xcb_window_t);
|
void setFrameExtents(xcb_window_t);
|
||||||
|
void refreshAllExtents();
|
||||||
|
|
||||||
inline xcb_window_t EWMHwindow = XCB_WINDOW_NONE;
|
inline xcb_window_t EWMHwindow = XCB_WINDOW_NONE;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue