Giter Site home page Giter Site logo

Comments (7)

ManoloFLTK avatar ManoloFLTK commented on July 26, 2024

That is unexpected. An FLTK app is expected to run correctly on a retina display
if it does not use the pixel_w() and pixel_h() functions provided it does not call
Fl::use_high_res_GL(1).
You can, if you have access to a mac, verify that with FLTK demo apps such as
cube or glpuzzle after commenting out their Fl::use_high_res_GL(1) statements and replacing
pixel_w() and pixel_h() by w() and h().

from fltk.

ManoloFLTK avatar ManoloFLTK commented on July 26, 2024

Sorry, I didn't mean to close this issue.

from fltk.

mtolly avatar mtolly commented on July 26, 2024

I have run into this on my own app -- it's a break in behavior when compiling on Catalina. A program compiled on prior macOS versions uses correct sizing, even when run on Catalina. Specifically the problem is in setting NSHighResolutionCapable to true (which is now also the default) but leaving use_high_res_GL disabled. If you explicitly set NSHighResolutionCapable to false the GL part draws okay, but the whole UI is not high-dpi.

SDL had the same problem, this is their fix: https://hg.libsdl.org/SDL/rev/46b094f7d20e

I am not a Cocoa/ObjC expert but I can see if I can try to put together a patch and test it soon. Otherwise if someone else wants to take a crack at it, I assume the right place to add the fix is here: https://github.com/fltk/fltk/blob/8a7d4c9/src/Fl_cocoa.mm#L2850-L2865

from fltk.

ManoloFLTK avatar ManoloFLTK commented on July 26, 2024

@mtolly: the FLTK equivalent of what you show from SDL has been committed
to branch 1.4 on 26 october 2019 (d1e346a).
Thus, and for several other reasons, it's necessary to use FLTK 1.4 to build on
macOS Catalina 10.15.

from fltk.

mtolly avatar mtolly commented on July 26, 2024

Ooh, thank you, I will give that a try. I was already using 1.4 but not quite the latest builds. Does that mean this issue can be closed, then?

from fltk.

ManoloFLTK avatar ManoloFLTK commented on July 26, 2024

If @mtolly could confirm it's OK with the current 1.4 branch, I'll close this issue.

from fltk.

ManoloFLTK avatar ManoloFLTK commented on July 26, 2024

Already solved.

from fltk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.