gnustep-dev
[Top][All Lists]
Advanced

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

Re: [wm-dev] Re: Possible patches from upstream source


From: Dan Pascu
Subject: Re: [wm-dev] Re: Possible patches from upstream source
Date: Wed, 2 Jun 2004 13:09:09 +0300
User-agent: KMail/1.6.2

the patch against workspace.c is definitely wrong.

The ones against actions.c and event.c are already in the latest Window Maker 
cvs tree. While they were added to correct the gtk2 focus rapidly switching 
between 2 windows problem, we later discovered that apparently it didn't fix 
this in all cases while at the same time it added an extra problem: transient 
windows from motif applications (like netscape 4.x or acrobat reader) will 
not receive input focus until one clicks on their titlebar, even though the 
titlebar shows the transient window is the one that has focus.
Because of this they may be dropped and a different solution may be sought.

On Wednesday 02 June 2004 05:26, Adam Fedor wrote:
> See comments below
>
> On Jun 1, 2004, at 12:14 AM, Alex Perez wrote:
> > Cheers,
> > Alex Perez
> > --- src/actions.c   Mon Aug 11 15:29:31 2003
> > +++ src/actions.c   Mon Aug 11 15:31:56 2003
> > @@ -144,6 +144,14 @@
> >        old_scr=scr;
> >      old_focused=old_scr->focused_window;
> >
> > +    /*
> > +     * Safeguard: make sure the timestamp is monotonically increasing
> > +     * (very unlikely that this will be needed, still a safeguard)
> > +     */
> > +    if (timestamp <= LastFocusChange)
> > +       timestamp = LastFocusChange + 1;
> > +
> > +
> >      LastFocusChange = timestamp;
> >
> >  /*
> > @@ -150,8 +158,8 @@
> >   * This is a hack, because XSetInputFocus() should have a proper
> >   * timestamp instead of CurrentTime but it seems that some times
> >   * clients will not receive focus properly that way.
> > + */
> >      if (ignoreTimestamp)
> > -*/
> >        timestamp = CurrentTime;
> >
> >      if (old_focused)
>
> Seems like these correct aberrant X11 behavior, so they should be fine
> with GNUstep.
>
> > --- src/event.c     Mon Aug 11 15:29:31 2003
> > +++ src/event.c     Mon Aug 11 15:32:06 2003
> > @@ -402,7 +402,6 @@
> >  static void
> >  saveTimestamp(XEvent *event)
> >  {
> > -    LastTimestamp = CurrentTime;
> >
> >      switch (event->type) {
> >       case ButtonRelease:
>
> Not sure. Seems harmless.
>
> > --- src/workspace.c Mon Aug 11 15:29:33 2003
> > +++ src/workspace.c Mon Aug 11 15:33:33 2003
> > @@ -574,10 +574,12 @@
> >                                &foo, &foo, &foo, &foo, &mask)) {
> >             tmp = wWindowFor(win);
> >         }
> > -       if (!tmp && wPreferences.focus_mode == WKF_SLOPPY) {
> > -           wSetFocusTo(scr, foc);
> > -       } else {
> > -           wSetFocusTo(scr, tmp);
> > +       if (!tmp) {
> > +           if (wPreferences.focus_mode == WKF_SLOPPY) {
> > +               wSetFocusTo(scr, foc);
> > +           } else {
> > +               wSetFocusTo(scr, tmp);
> > +           }
> >         }
>
> Definitely wrong!  This potentially sets focus to a NULL window.
>
> _______________________________________________
> INFO: https://windowmaker.org/lists/listinfo/wm-dev
> ARCHIVE: https://windowmaker.org/lists/archive/wm-dev/
> CVS: http://windowmaker.org/development-cvs.html

-- 
Dan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]