Skip to content

Commit c502a09

Browse files
authored
Glfw maximize (#7785)
1 parent ef094b2 commit c502a09

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libs/openFrameworks/app/ofAppGLFWWindow.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ void ofAppGLFWWindow::setup(const ofGLFWWindowSettings & _settings) {
171171
glfwWindowHint(GLFW_STENCIL_BITS, settings.stencilBits);
172172
glfwWindowHint(GLFW_STEREO, settings.stereo);
173173
glfwWindowHint(GLFW_VISIBLE, GL_FALSE);
174+
glfwWindowHint(GLFW_MAXIMIZED, settings.maximized);
174175
#ifndef TARGET_OSX
175176
glfwWindowHint(GLFW_AUX_BUFFERS, settings.doubleBuffering ? 1 : 0);
176177
#else
@@ -289,6 +290,9 @@ void ofAppGLFWWindow::setup(const ofGLFWWindowSettings & _settings) {
289290
}
290291
targetWindowMode = settings.windowMode;
291292
settings.windowMode = OF_WINDOW;
293+
if (settings.maximized) {
294+
glfwMaximizeWindow(windowP);
295+
}
292296
} else {
293297
if (settings.isPositionSet()) {
294298
setWindowPosition(settings.getPosition().x, settings.getPosition().y);

libs/openFrameworks/app/ofAppGLFWWindow.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class ofGLFWWindowSettings : public ofGLWindowSettings {
5252
bool decorated = true;
5353
bool resizable = true;
5454
bool transparent = false;
55+
bool maximized = false;
5556
int monitor = 0;
5657
bool multiMonitorFullScreen = false;
5758
std::shared_ptr<ofAppBaseWindow> shareContextWith;

0 commit comments

Comments
 (0)