Subject: faking ButtonPress in module code

From: Dominik Vogt <[email-masked]>
Date: Sat, 20 Nov 1999 04:43:46 +0100

Does anybody remember what this piece of code in
module_interface.c (HandleModuleInput) is good for?

    if(tmp_win)
    {
      if (!IS_ICONIFIED(tmp_win))
      {
        Event.xbutton.x_root = tmp_win->frame_g.x;
        Event.xbutton.y_root = tmp_win->frame_g.y;
      }
      else
      {
        Event.xbutton.x_root = tmp_win->icon_x_loc;
        Event.xbutton.y_root = tmp_win->icon_y_loc;
      }
    }
      else
    {
          XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild, &JunkX,&JunkY,
                        &Event.xbutton.x_root,&Event.xbutton.y_root,&JunkMask);
    }

I understand why we need to fake a ButtonPress, but why
is it necessary to make it look as if it was at the position
of the frame window instead of the real pointer position?
Is this necessary for some cryptic functions sent by modules?
Or can we simply alwasy call XQueryPointer?

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
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]