FLTK logo

STR #3123

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 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]

STR #3123

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:Add capability to remove modal states from a window, restoring it to "normal"
Version:1.3-feature
Created By:ianmacarthur
Assigned To:ianmacarthur
Fix Version:1.3-current (SVN: v10404)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 ianmacarthur
02:43 Sep 02, 2014
clear_modal.patch
2k
 
 
#2 ianmacarthur
02:43 Sep 02, 2014
modal-test.cxx
3k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 ianmacarthur
02:43 Sep 02, 2014
The current API exposes methods to put a window into the "modal" and "non-modal" states, but does not expose any means to restore "normal" window modality.

Further, the necessary mechanisms to do this are not available to the user, as they are private within Fl_Window.

This patch proposes adding an inline method to Fl_Window to provide a means to clear the modal flags and return a window to "normal" modality.

Discussed in the fltk.dev list in August/Sept 2014.
 
 
#2 ianmacarthur
02:44 Sep 02, 2014
OK, I did a check of this, under Win7 and F17 (with whichever WM F17 ships as stock, some gnome shell anyway...)
I haven't tested on OSX yet.

In the two cases tested so far, it seems you *can not* change the modal state whilst the window is shown. However, hiding/showing the window makes the change take effect.

I find I can reliably change the modality of a window by doing:

- hide the window
- clear the modal state flags
- set whatever new modal state is desired
- show the window

On Win7, my test code does this and it seems to work pretty well, apart from a slight flicker as the hide/show takes effect.

On F17, it works, but I can't persuade the WM to re-show the (modal) window at the same location the "normal" window held when it was shown... There's probably something subtle I'm missing about how X handles the origin of transient-for windows or something, but it looks scrappy in my test.

It does actually work, however; the re-shown window has the desired modal state, and I can switch between all three modality states freely. I just can't keep the window position consistent...

Once reshown, I can drag the window wherever I like and it appears to behave OK in all other respects.

This behaviour might be WM specific, of course, so other X systems may exhibit different behaviours here...


If we decide to add this, it'll need a good story in the docs to explain about hiding / showing the windows, and probably with a caveat to suggest folks only use this is they really, really, need to...!
 
 
#3 ianmacarthur
02:45 Sep 02, 2014
Tested under OSX 10.9.4, appears to work fine, looks broadly similar to the Win7 test, in that the window stays where I want it when I change the modality...  
 
#4 ianmacarthur
02:47 Sep 02, 2014
Patch comprises a modification to Fl_Window.H to implement the method, but some proposed doygen text to describe the change in the docs.

Test file should compile as:

     fltk-config --compile modal-test.cxx

and allow the toggling between the three modalities to be exercised.
 
 
#5 ianmacarthur
07:27 Oct 29, 2014
Fixed in Subversion repository.  
     

Return to Bugs & Features ]

 
 

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'.