Skip to content
Snippets Groups Projects
Commit 5fe91261 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

gtk.gdk.WINDOW_TYPE_HINT_TOOLTIP only exists in gtk >= 2.10. fixes #3484

parent 4187f57e
No related branches found
No related tags found
No related merge requests found
......@@ -2038,7 +2038,8 @@ class ChatControl(ChatControlBase):
# so this line adds that
window.set_events(gtk.gdk.POINTER_MOTION_MASK)
window.set_app_paintable(True)
window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_TOOLTIP)
if gtk.gtk_version >= (2, 10, 0) and gtk.pygtk_version >= (2, 10, 0):
window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_TOOLTIP)
window.realize()
window.window.set_back_pixmap(pixmap, False) # make it transparent
......
......@@ -64,7 +64,8 @@ class BaseTooltip:
self.win.set_border_width(3)
self.win.set_resizable(False)
self.win.set_name('gtk-tooltips')
self.win.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_TOOLTIP)
if gtk.gtk_version >= (2, 10, 0) and gtk.pygtk_version >= (2, 10, 0):
self.win.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_TOOLTIP)
self.win.set_events(gtk.gdk.POINTER_MOTION_MASK)
self.win.connect_after('expose_event', self.expose)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment