FLTK logo

[master] 9a2b3ef - Input Method support: have the auxiliary window follow when the focus window is moved.

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 ]

[master] 9a2b3ef - Input Method support: have the auxiliary window follow when the focus window is moved. "ManoloFLTK" Jan 08, 2022  
 
commit 9a2b3ef798d0baf4228b69b941b7cdb25aca6ab6
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Sat Jan 8 17:08:39 2022 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Sat Jan 8 17:08:39 2022 +0100

    Input Method support: have the auxiliary window follow when the focus window is moved.

 src/Fl_x.cxx | 5 +++++
 1 file changed, 5 insertions(+)

diff --git src/Fl_x.cxx src/Fl_x.cxx
index f76d459..ff48df4 100644
--- src/Fl_x.cxx
+++ src/Fl_x.cxx
@@ -2321,6 +2321,11 @@ void Fl_X11_Window_Driver::resize(int X,int Y,int W,int H) {
     if (shown()) {pWindow->redraw();}
   } else {
     x(X); y(Y);
+    if (fl_xim_win && Fl::focus()) {
+      // Force the Input Method auxiliary window to move too.
+      Fl::focus()->handle(FL_FOCUS);
+      fl_set_spot(fl_font(), fl_size(), Fl::focus()->x(), Fl::focus()->y() + fl_size(), Fl::focus()->w(), Fl::focus()->h(), NULL);
+    }
   }
 
   if (resize_from_program && is_a_resize && !pWindow->resizable()) {
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'.