aboutsummaryrefslogtreecommitdiff
path: root/desktop/evilwm/fix-undef-soliddrag.patch
blob: de7f97ba440a91bec4dead59d7c11291ad61dc12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
diff --git a/ChangeLog b/ChangeLog
index 8c31b4d..0127038 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+  * Fix compilation with SOLIDDRAG undefined [jake]
+
 Version 1.4.3, Sat Mar  9 2024
 
   * Force dock windows to have _NET_WM_STATE_FOCUSED
diff --git a/client_move.c b/client_move.c
index 1dacd6e..3c7140a 100644
--- a/client_move.c
+++ b/client_move.c
@@ -230,7 +230,7 @@ void client_move_drag(struct client *c, unsigned button) {
 #ifdef INFOBANNER_MOVERESIZE
 	create_info_window(c);
 #endif
-	if (option.no_solid_drag) {
+	if (OPTION_NO_SOLID_DRAG) {
 		XGrabServer(display.dpy);
 		draw_outline(c);  // draw
 	}
@@ -242,7 +242,7 @@ void client_move_drag(struct client *c, unsigned button) {
 			case MotionNotify:
 				if (ev.xmotion.root != c->screen->root)
 					break;
-				if (option.no_solid_drag) {
+				if (OPTION_NO_SOLID_DRAG) {
 					draw_outline(c);  // erase
 					XUngrabServer(display.dpy);
 				}
@@ -254,7 +254,7 @@ void client_move_drag(struct client *c, unsigned button) {
 #ifdef INFOBANNER_MOVERESIZE
 				update_info_window(c);
 #endif
-				if (option.no_solid_drag) {
+				if (OPTION_NO_SOLID_DRAG) {
 					XSync(display.dpy, False);
 					XGrabServer(display.dpy);
 					draw_outline(c);  // draw
@@ -269,7 +269,7 @@ void client_move_drag(struct client *c, unsigned button) {
 			case ButtonRelease:
 				if (ev.xbutton.button != button)
 					continue;
-				if (option.no_solid_drag) {
+				if (OPTION_NO_SOLID_DRAG) {
 					draw_outline(c);  // erase
 					XUngrabServer(display.dpy);
 				}
@@ -277,7 +277,7 @@ void client_move_drag(struct client *c, unsigned button) {
 				remove_info_window();
 #endif
 				XUngrabPointer(display.dpy, CurrentTime);
-				if (option.no_solid_drag) {
+				if (OPTION_NO_SOLID_DRAG) {
 					// For solid drags, the client was
 					// moved with the mouse.  For non-solid
 					// drags, we need a final move/raise:
diff --git a/evilwm.h b/evilwm.h
index e46cb78..7f2aedf 100644
--- a/evilwm.h
+++ b/evilwm.h
@@ -52,8 +52,10 @@ struct options {
 
 extern struct options option;
 
-#ifndef SOLIDDRAG
-# define option.no_solid_drag 1
+#ifdef SOLIDDRAG
+# define OPTION_NO_SOLID_DRAG (option.no_solid_drag)
+#else
+# define OPTION_NO_SOLID_DRAG (1)
 #endif
 
 extern unsigned numlockmask;