Fixed window not getting input focus when skip taskbar is set

This commit is contained in:
Peter B. Jørgensen 2010-07-13 15:07:40 +02:00
parent 656c2b3b76
commit 6a26db7465
1 changed files with 4 additions and 1 deletions

View File

@ -259,7 +259,7 @@ class Window(Container, gtk.Window):
if self.iswithdrawn == True: if self.iswithdrawn == True:
if self.position: if self.position:
self.move(self.position[0], self.position[1]) self.move(self.position[0], self.position[1])
self.present() self.show()
else: else:
self.position = self.get_position() self.position = self.get_position()
self.hidefunc() self.hidefunc()
@ -347,6 +347,9 @@ class Window(Container, gtk.Window):
def show(self, startup=False): def show(self, startup=False):
"""Undo the startup show request if started in hidden mode""" """Undo the startup show request if started in hidden mode"""
gtk.Window.show(self) gtk.Window.show(self)
#Present is necessary to grab focus when window is hidden from taskbar
self.present()
#Window must be shown, then hidden for the hotkeys to be registered #Window must be shown, then hidden for the hotkeys to be registered
if (self.ignore_startup_show and startup == True): if (self.ignore_startup_show and startup == True):
self.hide() self.hide()