Re: [gtkmm] How do I stop a new Gtk::Window to receive the focus?



>Hi,
>
>I've got a main window, which popups another Gtk::Window every now and then.
>When I show_all() this new window (a normal, but transient, window) it 
>automatically receives the focus.
>However, I'm using this window for a small auto completion test program as 
>shown on the following screenshot, so I just can't let this happen.. it 
>isn't handy when you've to Alt+Tab everytime the popup window comes up :)
>
>http://home.quicknet.nl/qn/prive/rm.vaneijbergen/ac2.png
>
>
>I've tried many possible solutions, but none of them worked:
>
>1) disabling nearly every derived 'on_' focus method
>2) the gdk_grab_yadda_yadda + idle function method from the Gtk source 
>(combo widget)
>3) many other hacks including complete hiearchies of static variables and 
>ugly functions to prevent the focussing

hack-but-works: use a key snooper. don't know if gtkmm2 has wrapped them.
better-but-less-robust: make the window modal

--p



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]