STR #2903

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 ]

STR #2903

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:2 - Specific to an operating system
Subsystem:Core Library
Summary:Fl_X accesses protected member of Fl_Widget
Version:1.3.2
Created By:gahr
Assigned To:AlbrechtS
Fix Version:1.3.3 (SVN: v9750)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size top right image
 
#1 gahr
06:56 Dec 12, 2012
patch-FL_Fl_Widget.H
0k
 
 
#2 AlbrechtS
08:58 Dec 12, 2012
str_2903.patch
1k
 
bottom left image   bottom right image

Trouble Report Comments:


Name/Time/Date Text top right image
 
#1 gahr
06:56 Dec 12, 2012
src/Fl_x.cxx:[1876, 1943, 1987] use Fl_Widget::FULLSCREEN.

Clang bails out with the following errors:

Fl_x.cxx:1876:33: error: 'FULLSCREEN' is a protected member of 'Fl_Widget'
  if (win->flags() & Fl_Widget::FULLSCREEN && !Fl_X::ewmh_supported()) {
                                ^
../FL/Fl_Widget.H:173:9: note: declared protected here
        FULLSCREEN      = 1<<18,  ///< a fullscreen window (Fl_Window)
        ^
Fl_x.cxx:1943:35: error: 'FULLSCREEN' is a protected member of 'Fl_Widget'
    if (win->flags() & Fl_Widget::FULLSCREEN && Fl_X::ewmh_supported()) {
                                  ^
../FL/Fl_Widget.H:173:9: note: declared protected here
        FULLSCREEN      = 1<<18,  ///< a fullscreen window (Fl_Window)
        ^
Fl_x.cxx:1987:33: error: 'FULLSCREEN' is a protected member of 'Fl_Widget'
  if (win->flags() & Fl_Widget::FULLSCREEN && !Fl_X::ewmh_supported()) {
                                ^
../FL/Fl_Widget.H:173:9: note: declared protected here
        FULLSCREEN      = 1<<18,  ///< a fullscreen window (Fl_Window)
        ^
3 errors generated.
*** [Fl_x.o] Error code 1

The patch attached proposes to add Fl_x as a friend class to Fl_Widget.
 
 
#2 AlbrechtS
08:58 Dec 12, 2012
Hmm, you marked Scope 2 (Specific to an operating system), but didn't tell us which one...

Anyway, according to the line numbers, this must be U*X, Linux, OS X ?

Thanks for the patch, but that's probably not what we want. The proper way should be to use fullscreen_active() instead of using the flag directly.

Could you please try the attached patch instead ? (And please don't forget to revert your changes). Does this work with clang?
 
 
#3 gahr
09:13 Dec 12, 2012
Sorry for the missing information, this is

> uname -orp
FreeBSD 10.0-CURRENT amd64

> c++ --version
FreeBSD clang version 3.2 (trunk 162107) 20120817
Target: x86_64-unknown-freebsd10.0
Thread model: posix

I agree that using the fullscreen_active method is preferable. The patch that you have suggested works indeed.

As I'm the maintainer of the fltk port to FreeBSD, I'm including it in our port until a new release including it is shipped.

Thanks!
 
 
#4 AlbrechtS
09:28 Dec 12, 2012
Fixed in Subversion repository.

Thanks for quick confirmation, this is now in svn r 9750.
 
 
#5 AlbrechtS
01:12 Dec 13, 2012
Fixed in 3.0 as well (svn r 9751).  
bottom left image   bottom right image

Return to Bugs & Features ]

 
 

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