From 668d4917a443d5197bc3d26894ac5f0a0b62ff5c Mon Sep 17 00:00:00 2001
From: loong_C <loong_c@yeah.net>
Date: Wed, 20 Jul 2022 10:32:33 +0800
Subject: [PATCH] Fix-build-failure-with-gcc-10

---
 src/event_monitor.cpp     | 4 ++++
 src/screen_shot_event.cpp | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/src/event_monitor.cpp b/src/event_monitor.cpp
index 5fb2d83..caaab95 100755
--- a/src/event_monitor.cpp
+++ b/src/event_monitor.cpp
@@ -23,6 +23,10 @@
 #include "keydefine.h"
 
 #include <X11/Xlibint.h>
+// gcc 版本大于10时，取消min 宏定义
+#if __GNUC__ == 10
+#undef min
+#endif
 #include <X11/Xutil.h>
 #include <X11/cursorfont.h>
 #include <X11/keysymdef.h>
diff --git a/src/screen_shot_event.cpp b/src/screen_shot_event.cpp
index 2ff3134..28d1360 100755
--- a/src/screen_shot_event.cpp
+++ b/src/screen_shot_event.cpp
@@ -23,6 +23,10 @@
 #include "keydefine.h"
 
 #include <X11/Xlibint.h>
+// gcc 版本大于10时，取消min 宏定义
+#if __GNUC__ == 10
+#undef min
+#endif
 #include <X11/Xutil.h>
 #include <X11/cursorfont.h>
 #include <X11/keysymdef.h>
-- 
2.20.1

