Subject: Drag a window into FvwmPager (and drag-n-drop)

From: Toshi Isogai <[email-masked]>
Date: Mon, 16 Mar 1998 16:57:13 -0700 (MST)

I made patches to drag a window/icon into FvwmPager to move the
window/icon.  I also added code to perform drag-and-drop type
operation to a module. 

The patches are in 2 files. One is for fvwm base code and the other is
for FvwmPager.  Most of the change is done on move.c, builtin.c,
FvwmPager.c, and x_pager.c.  Other files are modified in a few lines
to glue things up or to fix a bug, which is that an icon may not 
show up when it is drag-out from FvwmPager. (Who would have used this
feature ? It was hard pick an icon on FvwmPager in reasonable size.)

Here is how it works. Firstly, modules tells fvwm2 that they wait for
X events notification. During normal window move or active-placement,
EnterWindow events are checked against these modules. If there is such
a module, normal window move is terminated and send a command string
to the module using M_STRING protocol. Then, the module starts taking
over.

The code is generic so that any modules can be activated.

As an example of drag-in to FvwmPager, this is what happens.
When the new FvwmPager is invoked, it looks for a config line

   *FvwmPagerDragIn [True|False]

(the default is true), then, it sends a command back to fvwm2:

   Notify FvwmPager <window id> EnterWindow

Fvwm2 registers FvwmPager to notify when EnterWindow occurs during
normal window move or active-placement by sending a string to
FvwmPager: 

   WindowId <window id> EnterWindow

Drag-and-drop type operation has the same principle as the above. At
this time, I don't have any modules to take advantage of this feature
yet. (Therefore, it may have bugs.) The command these modules should
send to main fvwm2 is: 

   Notify <module name> <window id> ButtonRelease

When a window is dragged and dropped onto the module, it will receive
a string:

   WindowId <window id> ButtonRelease

These Notify commands, which I had to define, can be sent anytime
while the module is active and can be sent from anywhere, it does not
be from the module itself. 

The string to send FvwmPager can be also used in .fvwm2rc config file.
I have defined mouse 2 on title bar to do pager move.

  Mouse 2 T A SendToModule FvwmPager WindowId $w EnterWindow

You will see a similar but shorter mail and the patch files if you
subscribe fvwm2 mailing list. I assume most of you are. The patch
files are also available at:

  www.concentric.net/~isogai/fvwm2/pager-dragin.patch.gz
  www.concentric.net/~isogai/fvwm2/fvwm-dragin.patch.gz

Any comments are appreciated.

----
P.S.

Chuck,

I didn't receive any comments on the second email. So, I just
went ahead. I believe this change is somewhat closer to what you
said earlier.

-----------------------------------------------------
Toshi Isogai    �볭����

KENTEK Information Systems
[email-masked]

---

From: "Charles Hines" <[email-masked]>
Date: Mon, 23 Mar 1998 09:40:43 -0500 (EST)

>>>>> "Toshi" == Toshi Isogai <[email-masked]> writes:

(I tried reply to this last week, but my outgoing email has been
messed up lately - hopefully this time it'll make it)

Toshi> I made patches to drag a window/icon into FvwmPager to move the
Toshi> window/icon.  I also added code to perform drag-and-drop type
Toshi> operation to a module.
....
Toshi> The code is generic so that any modules can be activated.
....
Toshi> P.S.

Toshi> Chuck,

Toshi> I didn't receive any comments on the second email.

Oops - sorry about that.

Toshi> So, I just went ahead. I believe this change is somewhat closer
Toshi> to what you said earlier.

Yeah, it does look a little more generic now.  I'll take a look and
play around with it when I get a chance.

Chuck

--
*******************************************************************************
Charles K. Hines <[email-masked]>
IBM Logic Synthesis Developer [BooleDozer (TM)]
Martial Arts Instructor [Modern Arnis, Presas Style Filipino Martial Arts]

         "Go back to sleep, Chuck.  You're just havin' a nightmare
             -- of course, we ARE still in Hell." (Gary Larson)
*******************************************************************************
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].