Skip to content

ofSetFullscreen - issues after entering and exit fullscreen #6719

@dimitre

Description

@dimitre

After enter fullscreen and exit, sometimes aspect ratio is changed and window will only work correctly on fullscreen.
I've noticed this on Big Sur, apple m1, not sure if it is affect other builds too.
this only happens when my main window is created with dimensions exceeding or equaling screen size.
for example in this computer if my window width is 1439 it doesn't happen, if it is 1440 it start to happen.
vertical window size seems to influence but not sure how.
mouse coordinates are still good after the issue.

void ofApp::draw(){
    ofSetColor(255,0,70);
    ofDrawCircle(300, 300, 300);
}

bool fs = false;
void ofApp::keyPressed(int key){
    if (key == 'f') {
        fs ^=1;
        ofSetFullscreen(fs);
    }
}

Before Fullscreen
Screen Shot 2021-03-25 at 12 04 48

After Fullscreen
Screen Shot 2021-03-25 at 12 04 52

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions