Skip to content

Commit b3be979

Browse files
committed
(#18) Code cleanup on Linux
1 parent 7163f14 commit b3be979

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/linux/window_manager.cc

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include <X11/Xlib.h>
22
#include <X11/Xutil.h>
33
#include "../window_manager.h"
4-
#include <iostream>
54
extern "C" {
65
#include "../xdisplay.h"
76
}
@@ -84,28 +83,21 @@ bool focusWindow(const WindowHandle windowHandle) {
8483
}
8584

8685
bool resizeWindow(const WindowHandle windowHandle, const MMSize newSize) {
87-
std::cout << "resizing" << std::endl;
8886
Display* display = XGetMainDisplay();
8987
if (display != NULL && windowHandle >= 0) {
90-
XResizeWindow(display, windowHandle, newSize.width, newSize.height);
88+
auto status = XResizeWindow(display, windowHandle, newSize.width, newSize.height);
9189
XFlush(display);
92-
std::cout << "resized" << std::endl;
93-
94-
return true;
90+
return status;
9591
}
9692
return false;
9793
}
9894

9995
bool moveWindow(const WindowHandle windowHandle, const MMPoint newOrigin) {
100-
std::cout << "moving" << std::endl;
101-
10296
Display* display = XGetMainDisplay();
10397
if (display != NULL && windowHandle >= 0) {
104-
XMoveWindow(display, windowHandle, newOrigin.x, newOrigin.y);
98+
auto status = XMoveWindow(display, windowHandle, newOrigin.x, newOrigin.y);
10599
XFlush(display);
106-
std::cout << "moved" << std::endl;
107-
108-
return true;
100+
return status;
109101
}
110102
return false;
111103
}

0 commit comments

Comments
 (0)