[pygtk] fullscreen trouble on windows
khiraly
khiraly123 at gmx.net
Wed Apr 9 07:54:03 WST 2008
Hi!
My main problem, that when I switch my application to fullscreen, I want
to hide to main manubar and toolbar, and want to show an button in place
of ("leave fullscreen").
When I hide some elements and show an another and switch right after to
fullscreen, the window not get truely fullscreen, but a half centimeter
less height.
I need to insert this:
toolbar.hide()
menubar.hide()
leave_fullscreen.show()
while gtk.events_pending(): gtk.main_iteration()
window.fullscreen()
And it will be truely fullscreen on windows xp. My linux box (with
ubuntu 7.10) does not suffer from this (metacity window manager).
The problem (where I dont know any workaround), that when I switched to
fullscreen, and after I want to hide or show some elements because a
button click. The window will be resized. And there is not true
fullscreen anymore.
I have windows xp at work, so I will be able only tomorrow to take
screenshot to better explain this issue. I have written a simple
demonstration code[1], but didnt tried out on windows xp (Im at home
right now). I will do tomorrow, and will confirm if the demonstration
code is right or not.
So have experienced anybody this issue? I use gtk 2.10 on windows xp.
Best regards,
Khiraly
[1]: available at:
http://pastebin.ca/977654
import gtk
global fullscreen_v
global options_v
fullscreen_v = 0
options_v = 0
window = gtk.Window ()
def button_clicked (button):
print 'Hello World!'
def fullscreen(button):
global fullscreen_v
if fullscreen_v:
window.unfullscreen()
fullscreen_v = 0
else:
options()
window.fullscreen()
fullscreen_v = 1
def options(button=None):
global options_v
if options_v:
l3.hide()
l2.set_label("Options >>>")
options_v = 0
else:
l3.show()
l2.set_label("Options <<<")
options_v = 1
window.set_title ('Hello World!')
window.connect ('destroy', lambda w: gtk.main_quit ())
h = gtk.VBox()
l = gtk.Button("Fullscreen")
l2 = gtk.Button("Options >>>")
l3 = gtk.Label("These is the options")
l4 = gtk.Statusbar()
l.connect('clicked', fullscreen)
l2.connect('clicked', options)
h.pack_start(l)
h.pack_start(l2)
h.pack_start(l3)
h.pack_start(l4, expand=False)
h.show_all()
l3.hide()
window.add(h)
window.present ()
gtk.main ()
More information about the pygtk
mailing list