#GLFW can't detect fullscreen

75 messages ยท Page 1 of 1 (latest)

dark reef
#

Hi! Anyone know how to detect fullscreen on GLFW? I tried glfwGetWindowMonitor, but it never returns NULL. I'm on GNOME btw.

violet geyser
#

hmm

#

i just use glfwGetPrimaryMonitor()

#

and from the monitor, glfwGetVideoMode

#

hmmm i might not understand the question

#

what are you actually trying to do?

#

@dark reef

#

usually you keep track of your application state, ie set the window to fullscreen or not, there is no api which retrieves that information for you

dark reef
#

@violet geyser im trying to detect whether the window is in fullscreen

#

But the function always returns a result, even for windowed windows, when it should return null.

#

So I cant use it for that

#

and I can't keep track of it myself since the OS might make my window fullscreen or not fullscreen

violet geyser
#

but how

#

what exactly are you making?

dark reef
#

wdym how

violet geyser
#

if you are in control of the app, then you decide when to go into fullscreen and when you get out of it

#

store that value in a bool

dark reef
#

@violet geyser the operating system can resize apps without the app knowing

#

and toggling fullscreen

#

so that wont work

violet geyser
#

when is that happening?

dark reef
#

wdym when

#

whenever the user wants to

violet geyser
#

ive never seen that in my life

#

no window is magically unfullscreening or going fullscreen

dark reef
#

well not magically, just when a user presses a shortcut

violet geyser
#

no

dark reef
#

im not lying you know

violet geyser
#

that is also application driven

dark reef
#

no ....

violet geyser
#

alt+f11 for instance

#

a common shortcut for that sort of thing

#

but the APP controls that, not the os

dark reef
#

can you explain how I can use shortcuts to toggle fullscreen then without programming keyboard input into my app

violet geyser
#

is english your native language? or am i speaking chinese

#

you need to add code obviously to handle keypresses if you want to react to those

dark reef
#

Just because youve never seen an OS control it doesnt mean its not real

violet geyser
#

show me, then

dark reef
#

are you seriously saying I'm lying?

violet geyser
#

im saying that it makes no sense what you are saying

#

not that you are lying

dark reef
#

Have you only ever used Windows

violet geyser
#

no?

dark reef
#

cuz maybe Windows doesn't have that

#

but GNOME does

violet geyser
#

did you just assume my OS? ๐Ÿ™‚

dark reef
#

yes :)

violet geyser
#

ok let me ask you something else then

#

when you say "fullscreen" what exactly do you mean by that

#

just maximized normal window or borderless window which has the same dimensions like the screen

dark reef
#

same dimensions

violet geyser
#

oki

#

if glfw doesnt want to cooperate, maybe you can grab the current videomode (width/height) and also current framebuffer width/height and compare those

#

and when they are the same, you could assume its fullscreen

#

potentially also compare left/top of both

dark reef
#

yeah i was reckoning that might be possible

#

but its weird glfw doesnt work

violet geyser
#

indeed

dark reef
#

because its so popular

violet geyser
#

perhaps its a bug, one could check glfw's sources

#

checking whether a window is fullscreen or not is most likely not a popular use case

dark reef
#

or maybe glfw authors didnt know that the OS can change it

#

ยฏ_(ใƒ„)_/ยฏ

#

so they just keep track of the state themselves

violet geyser
#

perhaps, you could fix that in glfw ๐Ÿ˜‰

#

would be a nice contribution, neh?

dark reef
#

mayhaps

#

this is the shortcut settings screen for gnome ^^^

#

thanks btw

violet geyser
#

Toggle fullscreen mode = disabled ๐Ÿ˜‰ for a good reason