FLTK logo

[branch-1.3] 12db275 - Fix build with FLTK_CONSOLIDATE_MOTION turned off (X11)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[branch-1.3] 12db275 - Fix build with FLTK_CONSOLIDATE_MOTION turned off (X11) "Albrecht Schlosser" Nov 05, 2021  
 
commit 12db27551ccc7b13829eaa96bf086112b7623850
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Fri Nov 5 13:44:54 2021 +0100
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Fri Nov 5 13:44:54 2021 +0100

    Fix build with FLTK_CONSOLIDATE_MOTION turned off (X11)
    
    Up to 1.3.7 this was obviously never turned off or nobody noticed
    the compilation problems.

 CHANGES      | 17 +++++++++++++++++
 src/Fl_x.cxx | 19 ++++++++++++++++---
 2 files changed, 33 insertions(+), 3 deletions(-)

diff --git CHANGES CHANGES
index d7ad583..7fda775 100644
--- CHANGES
+++ CHANGES
@@ -1,3 +1,20 @@
+CHANGES IN FLTK 1.3.8					RELEASED: xxx xx 2021
+
+FLTK 1.3.8 is a maintenance release with some fixes and enhancements.
+
+Details:
+
+  Albrecht Schlosser:
+    Make "FLTK_CONSOLIDATE_MOTION" user-definable (issue #76).
+
+  ManoloFLTK:
+    Account for deprecation of [NSBitmapImageRep initWithFocusedViewRect:]
+      in macOS 10.14.
+    macOS: fix fullscreen window when other windows were created before.
+    Fix issue #287: "FLTK 1.3.6 doesn't handle fullscreen on macOS".
+    Fix issue #288: "FLTK 1.3.6+ doesn't notify window movement on macOS".
+
+
 CHANGES IN FLTK 1.3.7					RELEASED: Jul 25 2021
 
 FLTK 1.3.7 is a maintenance release for macOS only. It fixes one
diff --git src/Fl_x.cxx src/Fl_x.cxx
index 3ffe741..ee4e3d8 100644
--- src/Fl_x.cxx
+++ src/Fl_x.cxx
@@ -200,6 +200,7 @@ extern int fl_send_system_handlers(void *e);
 static Fl_Window* send_motion;
 extern Fl_Window* fl_xmousewin;
 #endif
+
 static bool in_a_window; // true if in any of our windows, even destroyed ones
 static void do_queued_events() {
   in_a_window = true;
@@ -1725,7 +1726,9 @@ int fl_handle(const XEvent& thisevent)
     if ((Atom)(data[0]) == WM_DELETE_WINDOW) {
       event = FL_CLOSE;
     } else if (message == fl_XdndEnter) {
+#if FLTK_CONSOLIDATE_MOTION
       fl_xmousewin = window;
+#endif
       in_a_window = true;
       fl_dnd_source_window = data[0];
       // version number is data[1]>>24
@@ -1775,7 +1778,9 @@ int fl_handle(const XEvent& thisevent)
       break;
 
     } else if (message == fl_XdndPosition) {
+#if FLTK_CONSOLIDATE_MOTION
       fl_xmousewin = window;
+#endif
       in_a_window = true;
       fl_dnd_source_window = data[0];
       Fl::e_x_root = data[2]>>16;
@@ -1806,7 +1811,9 @@ int fl_handle(const XEvent& thisevent)
       break;
 
     } else if (message == fl_XdndDrop) {
+#if FLTK_CONSOLIDATE_MOTION
       fl_xmousewin = window;
+#endif
       in_a_window = true;
       fl_dnd_source_window = data[0];
       fl_event_time = data[2];
@@ -2093,7 +2100,9 @@ int fl_handle(const XEvent& thisevent)
       checkdouble();
     }
 
+#if FLTK_CONSOLIDATE_MOTION
     fl_xmousewin = window;
+#endif
     in_a_window = true;
     break;
 
@@ -2125,14 +2134,12 @@ int fl_handle(const XEvent& thisevent)
 
   case MotionNotify:
     set_event_xy();
+    in_a_window = true;
 #  if FLTK_CONSOLIDATE_MOTION
     send_motion = fl_xmousewin = window;
-    in_a_window = true;
     return 0;
 #  else
     event = FL_MOVE;
-    fl_xmousewin = window;
-    in_a_window = true;
     break;
 #  endif
 
@@ -2144,7 +2151,9 @@ int fl_handle(const XEvent& thisevent)
         xevent.xbutton.button == Button5) return 0;
     event = FL_RELEASE;
 
+#if FLTK_CONSOLIDATE_MOTION
     fl_xmousewin = window;
+#endif
     in_a_window = true;
     break;
 
@@ -2155,7 +2164,9 @@ int fl_handle(const XEvent& thisevent)
     Fl::e_state = xevent.xcrossing.state << 16;
     event = FL_ENTER;
 
+#if FLTK_CONSOLIDATE_MOTION
     fl_xmousewin = window;
+#endif
     in_a_window = true;
     { XIMStyles *xim_styles = NULL;
       if(!fl_xim_im || XGetIMValues(fl_xim_im, XNQueryInputStyle, &xim_styles, NULL, NULL)) {
@@ -2169,7 +2180,9 @@ int fl_handle(const XEvent& thisevent)
     if (xevent.xcrossing.detail == NotifyInferior) break;
     set_event_xy();
     Fl::e_state = xevent.xcrossing.state << 16;
+#if FLTK_CONSOLIDATE_MOTION
     fl_xmousewin = 0;
+#endif
     in_a_window = false; // make do_queued_events produce FL_LEAVE event
     return 0;
 
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.