FLTK logo

STR #3167

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 #3167

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:4 - High, e.g. key functionality not working
Scope:2 - Specific to an operating system
Subsystem:WIN32
Summary:Window size decreasing
Version:1.3.3
Created By:andek
Assigned To:manolo
Fix Version:1.3-current (SVN: v10680)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 ianmacarthur
01:49 Dec 10, 2014
Fl_win32.patch
2k
 
 
#2 ianmacarthur
01:49 Dec 10, 2014
patch_instructions.png
123k
 
 
#3 manolo
02:01 Apr 06, 2015
fake_x_wm.patch
4k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 andek
11:49 Dec 09, 2014
With FLTK 1.3.3 on Windows 8.1, built with VS2013, the size of a resizable window decreases each time it's opened. This can be reproduced in Fluid by opening and closing a window.  
 
#2 ianmacarthur
01:41 Dec 10, 2014
Note that this is related to, but different from, STR 3061

http://www.fltk.org/str.php?L3061
 
 
#3 ianmacarthur
01:49 Dec 10, 2014
Greentea has proposed a possible patch; attached here. (Also a png describing how to apply the patch...)

I have some concerns that the patch as formed is not ABI safe, but it does address the problem.
 
 
#4 ianmacarthur
01:51 Dec 10, 2014
Some prior discussion of this issue is covered in this thread:

https://groups.google.com/d/msg/fltkgeneral/_QUBkFsbQnQ/Ejp7-gHIstUJ
 
 
#5 AlbrechtS
06:01 Dec 10, 2014
I took a look at the code and what to do WRT ABI stability. I noticed:

(1) The public method

static int fake_X_wm(const Fl_Window* w, int &X, int &Y, int &bt, int &bx, int &by)

is not only defined in FL/win32.H, but also in FL/mac.H (but not in FL/x.H). So any code accessing this method is at least platform dependent.

(2) This method is always used (called) only in the same file it is implemented in:

 - src/Fl_win32.cxx
 - src/Fl_cocoa.mm

Hence there is no reason to make it a public method of class Fl_X (but see below).

(3) There are more calls to this function in Fl_win32.cxx so that the given patch is at least incomplete. Besides that the new method would have to be (re)defined in the class header as well.


(4) One possible resolution:

(4a) declare Fl_X::fake_X_wm() deprecated in FLTK 1.3.4, but leave the implementation as it is for compatibility

(4b) use a local static function in Fl_win32.cxx (and Fl_cocoa.mm) instead

(4c) remove Fl_X::fake_X_wm() in FLTK 1.4.0

Unfortunately this method uses some private members of Fl_Window, but this can supposedly be resolved.


(5) Another possible resolution:

Add yet another overloaded method with the additional parameters. This might be ABI preserving, because it adds a method.


I believe we should take a closer look at (4) and try to modify the patch accordingly. Unfortunately I don't have the time to do it right now...
 
 
#6 manolo
02:05 Apr 06, 2015
Attached fake_x_wm.patch is a proposal to close
this STR. It includes Fl_win32.patch and covers
all calls to Fl_X::fake_X_wm()
in an ABI-compatible way.

For lack of MS compiler, I don't see the bug, so can't
check the patch fixes it.
 
 
#7 ianmacarthur
03:00 Apr 06, 2015
Cool: and looks good on visual inspection, but...

I have neither a target (Win8) not a compiler (VS2012+) that manifests this failure however, so I don't think I can meaningfully test this.

We need input form users who can reproduce this failure mode to comemtn on what happens "in the wild" I think.
 
 
#8 andek
08:26 Apr 06, 2015
I tried the patch with VS2013 and it works fine!  
 
#9 manolo
23:32 Apr 06, 2015
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'.