Re: GTK+ combo box goes lower
On Mon, Dec 03, 2007 at 12:43:42AM +0200, Nikos Ntarmos wrote:
> On Sun, Dec 02, 2007 at 10:20:09PM +0100, Michal Nowak wrote:
> > Hi.
> >
> > Having this in .awesomerc:
> >
> > 125 rule
> > 126 {
> > 127 # Programe name (regexp)
> > 128 name = "Gimp"
> > 129 # Program tags (regexp)
> > 130 tags = "8"
> > 131 # Should we set this program to floating mode?
> > 132 float = true
> > 133 # Physical screen to map this windows to
> > 134 screen = 0
> > 135 }
> >
> > It happens with general GTK+ app but Gimp is where is pains me most.
> >
> > Run Gimp, select some window on the tag, but not the Gimp main one, than
> > select the Gimp main, click New and you can see somethink like [1].
> >
> > It happens whith all that rollete based GTK+ stuff. I remember it was
> > happening in DWM too. This bug occures only in client being float(ing).
> >
> > Unsure whether it is GTK+ or awesome/DWM fault but saw it only there.
>
> Hi there.
>
> I've also been bitten by this, but was too busy to look into it. If you
> click on the drop-down again so that it closes and then click on it once
> more, it will open above the floating window just fine. At first I
> thought this could somehow be related to the click-to-raise patchset,
> but if memory serves me well, it first appeared many commits after that.
> I'll do some bisect'ing later tonight and see if I can pinpoint the
> commit that introduced this behavior.
It turned out that it was my fault after all (hand over that pointy hat,
will you? :).
Please try the attached patch, against v2.0-rc2-3-g6f995ad. It fixes
things for me (and the logic seems correct).
Thanks.
\n\n
diff --git a/event.c b/event.c
index 5ebc72d..ca9916f 100644
--- a/event.c
+++ b/event.c
<at> <at> -197,13 +197,13 <at> <at> handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
if((c = get_client_bywin(awesomeconf->clients, ev->window)))
{
- XAllowEvents(c->display, ReplayPointer, CurrentTime);
focus(c, ev->same_screen, &awesomeconf[c->screen]);
if(CLEANMASK(ev->state, c->screen) != awesomeconf[c->screen].modkey)
{
if (ev->button == Button1)
{
restack(&awesomeconf[c->screen]);
+ XAllowEvents(c->display, ReplayPointer, CurrentTime);
grabbuttons(c, True, True, awesomeconf->modkey, awesomeconf->numlockmask);
}
}