openframeworks / openframeworks/openFrameworks

Retina fix, extra setWindowShape is not required

Open
#4,346 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

In ofAppGLFWWindow.cpp line 243, setWindowShape is not required, the window already has the right size.

Removing the line fixed it for me.

Tested on master branch, OS X 10.10.5, MacBook Pro Retina mid 2014.

I use the old trick I found on the forums to get Retina to work though, which is adding this line in the setup :

ofSetWindowShape(ofGetWidth(), ofGetHeight());

That doesn't have any effect without Retina so it doesn't matter. In the end, I don't know why Retina wouldn't work properly without the line.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in libs/openFrameworks/app/ofAppGLFWWindow.cpp at line 243 and inspect the surrounding window setup and setWindowShape call. Reproduce the behavior on the reported Retina setup, then verify that removing the extra call leaves the window correctly sized without breaking the documented ofSetWindowShape workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.