Commit cccdfb03 by Jessica Hawkwell

fixed a weird nullptr

1 parent cc327834
...@@ -32,7 +32,9 @@ long_line_column=120 ...@@ -32,7 +32,9 @@ long_line_column=120
[files] [files]
current_page=0 current_page=0
FILE_NAME_0=0;C++;0;EUTF-8;1;1;0;%2Fusr%2Fhome%2Fjlhawkwell%2FProjects%2FNitrogen%2Fsrc%2FNitroWin%2FNUtils.cpp;0;4 FILE_NAME_0=2377;C++;0;EUTF-8;1;1;0;%2Fusr%2Fhome%2Fjlhawkwell%2FProjects%2FNitrogen%2Fsrc%2FNitroWin%2FNWMAction.cpp;0;4
FILE_NAME_1=2016;C++;0;EUTF-8;1;1;0;%2Fusr%2Fhome%2Fjlhawkwell%2FProjects%2FNitrogen%2Fsrc%2FNitroWin%2FNWManager.cpp;0;4
FILE_NAME_2=117;CMake;0;EUTF-8;1;1;0;%2Fusr%2Fhome%2Fjlhawkwell%2FProjects%2FNitrogen%2FCMakeLists.txt;0;4
[VTE] [VTE]
last_dir=/usr/home/jlhawkwell last_dir=/usr/home/jlhawkwell
......
...@@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 3.10) ...@@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 3.10)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build/bin) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY build/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY build/lib)
......
...@@ -69,8 +69,8 @@ void NWMAction::onButtonPress(XButtonPressedEvent e) { ...@@ -69,8 +69,8 @@ void NWMAction::onButtonPress(XButtonPressedEvent e) {
unsigned int w = 0, h = 0; unsigned int w = 0, h = 0;
unsigned int bw = 0, depth = 0; unsigned int bw = 0, depth = 0;
Window frame = (*clients)[e.window]; Window frame = (*clients)[e.window];
Window *rroot; Window rroot;
XGetGeometry(disp, frame, rroot, &x, &y, &w, &h, &bw, &depth); XGetGeometry(disp, frame, &rroot, &x, &y, &w, &h, &bw, &depth);
if (drag_start_window == nullptr) { if (drag_start_window == nullptr) {
drag_start_window = new NPosition<int>(x, y); drag_start_window = new NPosition<int>(x, y);
} }
......
...@@ -55,7 +55,8 @@ NWManager::NWManager() { ...@@ -55,7 +55,8 @@ NWManager::NWManager() {
} }
NWManager::~NWManager() { NWManager::~NWManager() {
for (auto it : (NWMAction::clients)) { std::cout << "Unmapping all windows..." << std::endl;
for (auto it : (*NWMAction::clients)) {
NUtils::unFrameWindow(it.first); NUtils::unFrameWindow(it.first);
} }
XCloseDisplay(disp); XCloseDisplay(disp);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!