twm with multiple screens

Richard.Draves at M.GP.CS.CMU.EDU Richard.Draves at M.GP.CS.CMU.EDU
Mon Aug 22 15:08:15 AEST 1988


These patches don't allow one twm to manage multiple screens, but they
do make it possible to use one twm per screen.  Previously twm set
the input focus to a specific root window instead of PointerRoot.
These patches fix this.

Rich

*** events.c.~1~	Sun Jul 17 22:34:04 1988
--- events.c	Thu Aug 18 16:30:48 1988
***************
*** 1064,1070 ****
  		XSetWindowBorderPixmap(dpy, tmp_win->title_w, GrayTile);
  		*/
  		if (TitleFocus)
! 		    XSetInputFocus(dpy, Root, RevertToPointerRoot,
  			    CurrentTime);
  		Focus = NULL;
  	    }
--- 1064,1070 ----
  		XSetWindowBorderPixmap(dpy, tmp_win->title_w, GrayTile);
  		*/
  		if (TitleFocus)
! 		    XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot,
  			    CurrentTime);
  		Focus = NULL;
  	    }
*** menus.c.~1~	Mon Jun 20 21:23:48 1988
--- menus.c	Thu Aug 18 16:30:41 1988
***************
*** 594,600 ****
  	    XMapRaised(dpy, tmp_win->icon_w);
  	    if (tmp_win == Focus)
  	    {
! 		XSetInputFocus(dpy, Root, RevertToPointerRoot,
  		    CurrentTime);
  		Focus = NULL;
  		FocusRoot = TRUE;
--- 594,600 ----
  	    XMapRaised(dpy, tmp_win->icon_w);
  	    if (tmp_win == Focus)
  	    {
! 		XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot,
  		    CurrentTime);
  		Focus = NULL;
  		FocusRoot = TRUE;
***************
*** 914,920 ****
  void
  FocusOnRoot()
  {
!     XSetInputFocus(dpy, Root, RevertToPointerRoot, CurrentTime);
      if (Focus != NULL)
      {
  	XUnmapWindow(dpy, Focus->hilite_w);
--- 914,920 ----
  void
  FocusOnRoot()
  {
!     XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
      if (Focus != NULL)
      {
  	XUnmapWindow(dpy, Focus->hilite_w);
*** twm.c.~1~	Mon Jun 20 21:23:50 1988
--- twm.c	Thu Aug 18 16:30:37 1988
***************
*** 263,269 ****
      XSync(dpy, screen);
  
      XSetErrorHandler(Error);
!     XSetInputFocus(dpy, Root, RevertToPointerRoot, CurrentTime);
  
      TwmContext = XUniqueContext();
      MenuContext = XUniqueContext();
--- 263,269 ----
      XSync(dpy, screen);
  
      XSetErrorHandler(Error);
!     XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
  
      TwmContext = XUniqueContext();
      MenuContext = XUniqueContext();
***************
*** 408,414 ****
  	XConfigureWindow(dpy, tmp->w, xwcm, &xwc);
      }
  
!     XSetInputFocus(dpy, Root, RevertToPointerRoot, CurrentTime);
      XCloseDisplay(dpy);
      exit(0);
  }
--- 408,414 ----
  	XConfigureWindow(dpy, tmp->w, xwcm, &xwc);
      }
  
!     XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
      XCloseDisplay(dpy);
      exit(0);
  }



More information about the Comp.sources.bugs mailing list