https://bugs.freedesktop.org/show_bug.cgi?id=101489
Bug ID: 101489
Summary: Gtk.Window loses focus when clicking a Gtk.Popover
Product: Wayland
Version: unspecified
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: weston
Assignee: [email protected]
Reporter: [email protected]
Hi,
hope im right here
weston 1.12.0
OS: Ubuntu 17.04
I use Python 3.5.3
GTK+ Version: 3.22.11
PyGobject Version: 3.22.0
i created this minimal example:
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class Popover(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self)
self.set_title("Popover")
self.set_default_size(250, 250)
self.connect("destroy", Gtk.main_quit)
self.connect('focus-in-event', self.focus_in)
self.connect('focus-out-event', self.focus_out)
box = Gtk.Box()
box.set_orientation(Gtk.Orientation.VERTICAL)
self.add(box)
button = Gtk.MenuButton()
box.add(button)
pop = Gtk.Popover()
flowbox = Gtk.FlowBox()
flowbox.add(Gtk.Button(label='test'))
flowbox.show_all()
pop.add(flowbox)
button.set_popover(pop)
def focus_out(*args):
print('focus out')
def focus_in(*args):
print('focus in')
window = Popover()
window.show_all()
Gtk.main()
If you click the Gtk.MenuButton everything is alright, as soon as you click the
Button that is in the Gtk.Popover, first the focus-out of the Gtk.Window event
is triggered, then the focus-in event of the Gtk.Window is triggered.
The Window shouldn't focus out because i use widgets inside that Window.
thanks
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
wayland-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-bugs