Re: help needed: window focus bugs



Let me just take a minute and mention something related that is probably
of interest to an even wider group of application writers: It appears
the gtk+ support for _NET_WM_USER_TIME was incomplete.  If you have a
window open, and then use gtk_widget_hide and gtk_widget_show within
your app (or some equivalent functions, e.g. gtk_window_present can have
the same problem) then when the window opens the second time it could
appear without focus.  There is a new patch in bug 115650 that fixes
this issue.  This will certainly affect a _lot_ of applications.  It's a
fairly simple gtk+ patch, though.  I traced this down while trying to
figure out why certain gnome-applet windows weren't working w.r.t. focus
(and only some of the time, while others worked all the time...)

On Fri, 2004-08-20 at 14:22 +0100, Ross Burton wrote:
> Hi all,
> 
> Very late reply, but...
> 
> On Wed, 2004-08-11 at 22:09 -0600, Elijah Newren wrote:
> > Apps using gtk+ 2.4 will have to cut-and-paste from the
> > _gdk_x11_window_set_user_time function in gdk/x11/gdkwindow-x11.c.
> 
> Attempting to copy and paste this function into Gossip (as the anti-
> popup code breaks the notification icon) results in many compile errors
> -- structs like GdkWindowX11 are not in the installed headers so the
> code won't compile.
>
> Does anyone have working code against GTK+ 2.4.x for setting the
> timestamp on windows?

See the second patch in bug 150271, specifically the function
panel_gdk_x11_window_set_user_time that was added.  (The specific case
in that bug was that the user presses Alt+F2, which Metacity catches,
and Metacity has to forward that info to the panel, so the cases are
pretty similar.)


Cheers,
Elijah




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