Fix deprcation warning in later GTK versions

This commit is contained in:
Stephen Boddy 2015-11-28 19:53:57 +01:00
parent 0e2f170032
commit 9fa9c0e45a
1 changed files with 1 additions and 2 deletions

View File

@ -16,8 +16,7 @@ from cwd import get_pid_cwd
from version import APP_NAME, APP_VERSION
def eventkey2gdkevent(eventkey): # FIXME FOR GTK3: is there a simpler way of casting from specific EventKey to generic (union) GdkEvent?
gdkevent = Gdk.Event(eventkey.type)
gdkevent.key.type = eventkey.type
gdkevent = Gdk.Event.new(eventkey.type)
gdkevent.key.window = eventkey.window
gdkevent.key.send_event = eventkey.send_event
gdkevent.key.time = eventkey.time