voc / voctomix

Full-HD Software Live-Video-Mixer in python
https://c3voc.de/
MIT License
575 stars 104 forks source link

Feature/config window size #199

Closed fightling closed 6 years ago

fightling commented 6 years ago

fixed #150 and #69

syntax within the configuration (ini) file is:

# new section
[mainwindow]

# resize main window
width=1700
height=1000

# force main window to stay full screen
forcefullscreen=true

Hint: force_fullscreen was renamed later into forcefullscreen

fightling commented 6 years ago

did some code review... canceling this request and adding a new one

fightling commented 6 years ago

decided to continue here.

fightling commented 6 years ago

I think I would merge this request now. Adding x and y to set window position can be made but is usually up to the window manager. what do you think?

Any further suggestions?

And excuse me for bringing all that tension of my learning curve into the commit history :grin:

MaZderMind commented 6 years ago

Wouldn’t it be better to completely disable resizing if any if the tree options are set? I would expect the config options do disable manual resizing. This would also remove the need for the on-resize callback, which has a bad smell to me.

fightling commented 6 years ago

Good idea to make the window un-resizable when width/height is used. But full screen state is just not affected by this :/

See the documentation:

gtk_window_fullscreen ()

Asks to place window in the fullscreen state. Note that you shouldn’t assume the window is definitely full screen afterward, because other entities (e.g. the user or window manager) could unfullscreen it again, and not all window managers honor requests to fullscreen windows. But normally the window will end up fullscreen. Just don’t write code that crashes if not.

So I ended up to force this by restore full screen mode after change. I couldn't find a way to stop the window-state-event from being processed when full screen mode is manually turned off.

btw: I am using i3wm and I am experiencing that problem.