Blob Blame History Raw
diff -up easystroke-0.6.0/composite.cc.workarea easystroke-0.6.0/composite.cc
--- easystroke-0.6.0/composite.cc.workarea	2019-10-18 15:26:28.437229759 -0400
+++ easystroke-0.6.0/composite.cc	2019-10-18 15:26:33.667118848 -0400
@@ -47,10 +47,13 @@ void Popup::invalidate(int x1, int y1, i
 
 Composite::Composite() {
 #define N 128
-	int w = gdk_screen_width();
-	int h = gdk_screen_height();
-	num_x = (gdk_screen_width()  - 1)/N + 1;
-	num_y = (gdk_screen_height() - 1)/N + 1;
+	GdkRectangle workarea = {0};
+	gdk_monitor_get_workarea(gdk_display_get_primary_monitor(gdk_display_get_default()), &workarea);
+
+	int w = workarea.width;
+	int h = workarea.height;
+	num_x = (workarea.width  - 1)/N + 1;
+	num_y = (workarea.height - 1)/N + 1;
 	pieces = new Popup**[num_x];
 	for (int i = 0; i < num_x; i++) {
 		pieces[i] = new Popup*[num_y];
diff -up easystroke-0.6.0/shape.cc.workarea easystroke-0.6.0/shape.cc
--- easystroke-0.6.0/shape.cc.workarea	2019-10-18 15:27:21.515104163 -0400
+++ easystroke-0.6.0/shape.cc	2019-10-18 15:28:36.273518829 -0400
@@ -21,8 +21,11 @@
 #include <X11/extensions/shape.h>
 
 Shape::Shape() {
-	int w = gdk_screen_width();
-	int h = gdk_screen_height();
+	GdkRectangle workarea = {0};
+	gdk_monitor_get_workarea(gdk_display_get_primary_monitor(gdk_display_get_default()), &workarea);
+
+	int w = workarea.width;
+	int h = workarea.height;
 	Gdk::Color col = prefs.color.get().color;
 	unsigned long bg = ((col.get_red()/257)<<16) + ((col.get_green()/257)<<8) + col.get_blue()/257;
 	win = XCreateSimpleWindow(dpy, ROOT, 0, 0, w, h, 0, CopyFromParent, bg);