f.autosqueeze patch

From: sclark (sclark@detox.tat.fws.gov)
Date: Wed Aug 20 2003 - 20:26:34 CEST


On the off chance that this mailing list still works, I'm attaching a patch
which implements an f.autosqueeze function which toggles the AutoSqueeze state
of a window. The patch is against 3.6.

-steve

Steve Clark
Technology Applications Team
Natural Resources Research Center/USGS
sclark@detox.cr.usgs.gov
(970)226-9291

-------------------- snip snip --------------------

*** menus.c.orig Tue Dec 11 08:38:52 2001
--- menus.c Wed Aug 20 11:55:01 2003
***************
*** 2943,2948 ****
--- 2943,2955 ----
          }
          break;
  
+ case F_AUTOSQUEEZE:
+ if (DeferExecution(context, func, Scr->SelectCursor))
+ return TRUE;
+
+ ToggleAutoSqueeze (tmp_win);
+ break;
+
      case F_SQUEEZE:
          if (DeferExecution(context, func, Scr->SelectCursor))
              return TRUE;
***************
*** 4069,4074 ****
--- 4076,4088 ----
      if (Scr->RaiseWhenAutoUnSqueeze && tmp_win->squeezed) XRaiseWindow (dpy,
tmp_win->frame);
      Squeeze (tmp_win);
  }
+
+ void ToggleAutoSqueeze (tmp_win)
+ TwmWindow *tmp_win;
+ {
+ tmp_win->AutoSqueeze = ! tmp_win->AutoSqueeze;
+ }
+
  void Squeeze (tmp_win)
  TwmWindow *tmp_win;
  {
*** menus.h.orig Tue Dec 11 08:38:52 2001
--- menus.h Wed Aug 20 11:50:04 2003
***************
*** 244,248 ****
--- 244,249 ----
  extern Boolean TryNotToMoveOff ();
  extern void AutoSqueeze ();
  extern void Squeeze();
+ extern void ToggleAutoSqueeze();
  
  #endif /* _MENUS_ */
*** parse.c.orig Tue Dec 11 08:38:52 2001
--- parse.c Wed Aug 20 11:48:27 2003
***************
*** 778,783 ****
--- 778,784 ----
      { "f.altkeymap", FSKEYWORD, F_ALTKEYMAP },
      { "f.autolower", FKEYWORD, F_AUTOLOWER },
      { "f.autoraise", FKEYWORD, F_AUTORAISE },
+ { "f.autosqueeze", FKEYWORD, F_AUTOSQUEEZE },
      { "f.backiconmgr", FKEYWORD, F_BACKICONMGR },
      { "f.backmapiconmgr", FKEYWORD, F_BACKMAPICONMGR },
      { "f.beep", FKEYWORD, F_BEEP },
*** parse.h.orig Tue Dec 11 08:38:52 2001
--- parse.h Wed Aug 20 11:48:52 2003
***************
*** 159,164 ****
--- 159,165 ----
  #define F_RING 85
  #define F_AUTOLOWER 86
  #define F_FITTOCONTENT 87
+ #define F_AUTOSQUEEZE 88
  
  #define F_MENU 101 /* string */
  #define F_WARPTO 102 /* string */
*** ctwm.man.orig Tue Dec 11 08:38:52 2001
--- ctwm.man Wed Aug 20 12:05:19 2003
***************
*** 1730,1735 ****
--- 1730,1740 ----
  This function toggles whether or not the selected window is raised whenever
  entered by the pointer. See the description of the variable \fBAutoRaise\fP.
  
+ .IP "\fBf.autosqueeze\fP" 8
+ This function toggles whether or not the selected window is squeezed
+ whenever it loses focus. See the description of the variable
+ \fBAutoSqueeze\fP.
+
  .IP "\fBf.backmapiconmgr\fI" 8
  This function warps the pointer in the same manner as \fBf.backiconmgr\fP
  but only stops at windows that are mapped.



This archive was generated by hypermail 2.1.4 : Thu Aug 21 2003 - 06:45:04 CEST