Subject: Re: FVWM: Immovable windows

From: Gregg Dameron <[email-masked]>
Date: Mon, 22 Jul 2002 17:05:27 -0600

Dominik Vogt wrote:

> On Tue, Jul 09, 2002 at 07:32:40PM -0600, Gregg Dameron wrote:
> > Dominik Vogt wrote:
> >
> > > On Tue, Jul 09, 2002 at 10:25:38AM -0600, Gregg Dameron wrote:
> > > > Running 2.4.7 on Solaris 8.
> > > >
> > > > I have:
> > > >
> > > > Style * MwmFunctions
> > > > Style * MwmDecor
> > > > Style * NoOverride
> > > >
> > > > I have an application that turns off MWM_FUNC_MOVE, but I can still
> > > > move it around by dragging the title bar or using the Pager.  If I
> > > > turn off all FUNCs and DECORs except MWM_DECOR_TITLE, same result.
> > > > If I turn off everything (emulating a "splash screen"), I can still
> > > > move it around with the Pager.  In all cases the window is rendered
> > > > correctly (visually), it's just that I can't seem to shut off
> > > > moves.  What am I missing?
> > >
> > > Can you post some sample source so that I can try it myself?

Attached.  Thanks -
Gregg Dameron

/*
    A simple splash screen:  window with no decorations.

    cc -o splash splash.c -lXm -lXt -lX11
*/

#include <X11/Intrinsic.h>
#include <Xm/MwmUtil.h>
#include <Xm/Label.h>

void main(int argc, char *argv[])
{
    Widget        toplevel, label;
    XtAppContext  app;
    XmString 	  xmstr;

    XtSetLanguageProc (NULL, NULL, NULL);

    toplevel = XtVaAppInitialize (&app, "Splash", NULL, 0,
        &argc, argv, NULL, NULL);

    XtVaSetValues (toplevel,
	XmNmwmDecorations,
	    MWM_DECOR_ALL|
	    MWM_DECOR_BORDER|
	    MWM_DECOR_RESIZEH|
	    /* uncomment to lose the title bar as well: */
	    /* MWM_DECOR_TITLE| */
	    MWM_DECOR_MENU|
	    MWM_DECOR_MINIMIZE|
	    MWM_DECOR_MAXIMIZE,
	XmNmwmFunctions,
	    MWM_FUNC_ALL|
	    MWM_FUNC_RESIZE|
	    MWM_FUNC_MOVE|
	    MWM_FUNC_MINIMIZE|
	    MWM_FUNC_MAXIMIZE|
	    MWM_FUNC_CLOSE,
	XmNwidth, 400,
	XmNheight, 400,
	XmNx, 300,
	XmNy, 300,
	NULL);

    xmstr = XmStringCreateLocalized ("Splash Screen"); 

    label = XtVaCreateManagedWidget ("label",
        xmLabelWidgetClass, toplevel,
        XmNlabelString, xmstr,
        NULL);

    XmStringFree (xmstr);

    XtRealizeWidget (toplevel);

    XtAppMainLoop (app);
}

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 23 Jul 2002 10:42:16 +0200

> > > > Can you post some sample source so that I can try it myself?

THe original author of the mwm hints code seems to have thought it
is a good idea to ignore this hint.  In decorations.c, function
check_if_function_allowed() I found this:

    case F_MOVE:
      /* Move is a funny hint. Keeps it out of the menu, but you're
       * still allowed to move. */
      if((!(t->functions & MWM_FUNC_MOVE))&&menu_string)
	return 0;
      break;

I'll fix that.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [email-masked], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe

--
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]