mirror of https://github.com/hyprwm/Hypr.git
fix things in review
This commit is contained in:
parent
9c654f471d
commit
fed9b8ca04
|
@ -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::setFrameExtents(xcb_window_t w) {
|
void EWMH::refreshAllExtents() {
|
||||||
uint32_t extents[4] = {ConfigManager::getInt("border_size"), ConfigManager::getInt("border_size"), ConfigManager::getInt("border_size"), ConfigManager::getInt("border_size")};
|
for (auto& w : g_pWindowManager->windows)
|
||||||
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, w, HYPRATOMS["_NET_FRAME_EXTENTS"], XCB_ATOM_CARDINAL, 32, 4, &extents);
|
if (w.getDrawable() > 0)
|
||||||
|
setFrameExtents(w.getDrawable());
|
||||||
|
}
|
||||||
|
|
||||||
|
void EWMH::setFrameExtents(xcb_window_t w) {
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 New Issue