Subject: FVWM: CurrentScreen patch for fvwm 2.0.43

From: Dan Niles <[email-masked]>
Date: Wed, 10 Jul 1996 08:06:27 -0500

Here is my CurrentScreen patch for fvwm 2.0.43.  This patch makes CurrentScreen
(in the Next/Prev commands) work more intuitive.

Before this patch, CurrentDesk selects windows on the current desk, and
CurrentScreen selects window on the current page.  To select only windows
on the current screen (view port), both CurrentDesk and CurrentScreen must
be specified.

After the patch:

	CurrentDesk	selects windows on the current virtual desk
	CurrentPage	selects windows on the current virtual page
	CurrentScreen	selects windows on the current screen, or view port.

I apply it after the FlipFocus patch, but the FlipFocus patch is not
necessary.

------------------------- fvwm-2.0.43-CurrentScreen.patch --------------------
--- builtins.c.orig	Tue Jul  9 11:16:15 1996
+++ builtins.c	Tue Jul  9 11:29:07 1996
@@ -1794,7 +1794,7 @@
   Bool needsIconic = 0;
   Bool needsNormal = 0;
   Bool needsCurrentDesk = 0;
-  Bool needsCurrentScreen = 0;
+  Bool needsCurrentPage = 0;
   Bool needsVisible = 0;
   Bool needsInvisible = 0;
   char *AnyWindow = "*";
@@ -1844,7 +1844,12 @@
       else if(mystrcasecmp(condition,"!Visible")==0)
         needsInvisible = 1;
       else if(mystrcasecmp(condition,"CurrentScreen")==0)
-        needsCurrentScreen = 1;
+	{
+	  needsCurrentDesk = 1;
+	  needsCurrentPage = 1;
+	}
+      else if(mystrcasecmp(condition,"CurrentPage")==0)
+        needsCurrentPage = 1;
       else if(mystrcasecmp(condition,"CirculateHit")==0)
         useCirculateHit = 1;
       else if(mystrcasecmp(condition,"CirculateHitIcon")==0)
@@ -1898,7 +1903,7 @@
            ((!needsCurrentDesk)||(fw->Desk == Scr.CurrentDesk))&&
            ((!needsVisible)||(fw->flags & VISIBLE))&&
            ((!needsInvisible)||(!(fw->flags & VISIBLE)))&&
-           ((!needsCurrentScreen)||((fw->frame_x < Scr.MyDisplayWidth)&&
+           ((!needsCurrentPage)||((fw->frame_x < Scr.MyDisplayWidth)&&
                                     (fw->frame_y < Scr.MyDisplayHeight)&&
                                     (fw->frame_x+fw->frame_width > 0)&&
                                     (fw->frame_y+fw->frame_height > 0)))))
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: "Charles Hines" <[email-masked]>
Date: Wed, 10 Jul 1996 10:06:26 -0400

>>>>> "Dan" == Dan Niles <[email-masked]> writes:

Dan> Here is my CurrentScreen patch for fvwm 2.0.43.  This patch makes
Dan> CurrentScreen (in the Next/Prev commands) work more intuitive.

Dan> Before this patch, CurrentDesk selects windows on the current
Dan> desk, and CurrentScreen selects window on the current page.  To
Dan> select only windows on the current screen (view port), both
Dan> CurrentDesk and CurrentScreen must be specified.

Dan> After the patch:

Dan>    CurrentDesk     selects windows on the current virtual desk
Dan>    CurrentPage     selects windows on the current virtual page
Dan>    CurrentScreen   selects windows on the current screen, or view port.

Actually, I don't think the distinction between Page and Screen is
necessary.  I do think that CurrentScreen should be renamed to be
CurrentPage to match the semantics of Page and Desk in fvwm and Screen
in X11 (although I'd probably keep CurrentScreen around as an
undocumented synonym so as to not blow existing users out of the
water), and that it should always refer to just the visible page (and
not the same page on different desks) as that is really what makes the
most sense.  If the ability to select things on the same page in
different desks is truly needed, I think that should be called
SamePage.

Chuck

---

From: Dan Niles <[email-masked]>
Date: Wed, 10 Jul 1996 10:24:11 -0500

> different desks is truly needed, I think that should be called

The way CurrentScreen works now is it selects windows on the current page,
on any desk.  The patch changes CurrentScreen so that is always refers
to just the visible page (and not the same page on different desks).
The patch adds CurrentPage to maintain the functionality of the old
CurrentScreen.

I think it is usefull to be able to specify any window on the current desk,
and window on the current page (any desk), and windows only on the 
currently visible page.  What does everyone else think?

If all three specifications are available, what are the most intuitive
names for them?  My vote is for CurrentDesk, CurrentPage, and CurrentScreen.
I would like to hear what other people think.

Dan Niles

---

From: "Charles Hines" <[email-masked]>
Date: Wed, 10 Jul 1996 11:42:07 -0400

>> different desks is truly needed, I think that should be called

Dan> The way CurrentScreen works now is it selects windows on the
Dan> current page, on any desk.  The patch changes CurrentScreen so
Dan> that is always refers to just the visible page (and not the same
Dan> page on different desks).  The patch adds CurrentPage to maintain
Dan> the functionality of the old CurrentScreen.

Dan> I think it is usefull to be able to specify any window on the
Dan> current desk, and window on the current page (any desk), and
Dan> windows only on the currently visible page.  What does everyone
Dan> else think?

Dan> If all three specifications are available, what are the most
Dan> intuitive names for them?  My vote is for CurrentDesk,
Dan> CurrentPage, and CurrentScreen.  I would like to hear what other
Dan> people think.

Well, I just added your patch to 2.1.0, slightly modified to match
what I thought made the most sense:

  CurrentDesk - As expected
  CurrentPage - This page, this desk
  SamePage    - Same page XY, but any desk

and I left CurrentScreen as a synonym for SamePage (current behavior)
but I plan to remove CurrentScreen from the man page.  But perhaps a
better name for SamePage would be CurrentPageAnyDesk?  It may be long,
but I like explict names like that, so I think I'll change it to that
(CurrentPageAnyDesk) if no one comes up with a better one.

Chuck

---

From: Makoto MATSUSHITA <[email-masked]>
Date: Thu, 11 Jul 1996 02:30:12 +0900

Hmm. Maybe late responce...

chuck_hines>   CurrentDesk - As expected
chuck_hines>   CurrentPage - This page, this desk
chuck_hines>   SamePage    - Same page XY, but any desk

Why not getting more simple way:

CurrentDesk - to specify 'current desk', as expected.
		(ofcourse, do not consider page)
CurrentPage - to specify 'current page', as expected.
		(ofcourse, do not consider desk)

Is it not enough ? There are only TWO dimension, Desk and Page, but
why we need THREE flags ?

If my knowledge about Next/Prev/None implementation is right, and THIS
MY 'CurrentPage/CurrentDesk' DESIGN PROPOSAL is implemented, we can say

	Next [CurrentDesk,CurrentPage] whatever

to specify "search window which is in current desk and is in current
page, and if found, execute whatever (maybe user-defined function)".

I think it's very simple and strong, isn't it ? Or my misunderstanding ?

- -
Makoto `MAR_kun' MATSUSHITA