node-3d / glfw-raub

GLFW for Node.js
https://github.com/node-3d/node-3d
MIT License
60 stars 12 forks source link

disable auto_iconify #4

Closed yetzt closed 6 years ago

yetzt commented 6 years ago

AUTO_ICONIFY inconifies fullscreen windows when losing focus. this should not be enabled by default.

raub commented 6 years ago

As far as I understand, it only applies to real-fullscreen windows. I wonder if ALT+TAB works fine (i.e. minimizes) with this parameter and only "clicks outside" are ignored (as I haven't been using fullscreen much). If so, I agree that we could alter the default.

Could you also add it as an optional bool parameter in Window.constructor, named autoIconify? Just in case somebody needs auto iconification...

yetzt commented 6 years ago

i was testing on macos 10.11, creating a full screen window on my second monitor wirh monitors using different spaces. when moving the cursor back to my other monitor and focussing another app, the full screen window always iconifies, which pretty annoying.

with this change though, switching the focus with alt+tab has no impact, the full screen window stays in place, which might be unexpected in a different usecase.

i can add it as a parameter in the constructor.

raub commented 6 years ago

Then probably it is better to leave default (true) as it is, and provide opts.autoIconify parameter for those who know they need it. For me personally it has always been quite annoying when fullscreen window wouldn't go away upon ALT+TAB.

yetzt commented 6 years ago

its really the choice between two evils. i've exposed the setting in the window constructor now.