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

>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 :)
>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


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