Subject: FVWM: Luck of the Draw

From: David <[email-masked]>
Date: Wed, 14 Nov 2001 18:51:21 GMT

Hi Dan,

Thanks for your reply about my problems.

> THE REAL PROBLEM - isn't there always one under the presenting
> problem - is that while in telnet probably after hitting a combination
> of keystrokes I can't reconstruct THE WINDOW MANAGER WILL CONVERT
> ALL MY KEYBOARD ENTRY TO UPPER CASE. This means that if I am
> editing a file in vi, I can't quit the file because vi won't
> accept :WQ.
> 
> The cure for this is to click on "Restart Fvwm" in the desktop
> menu and then it will go back to lower case - which is why I 
> think this is a bug in fvwm.
> 
> The presenting problem is my concern that if the help desk gets
> a call for all caps, and then they tell the user to restart the
> fvwm, that the user will go nuts because they will think they
> have lost all their work when in fact only the current 
> viewport will have changed.

You write:

 >> FVWM cannot control the case of characters typed in your telnet
 >> window.

Would that it were so. But, unfortunately, I do start our in lower
case and then after a while usually while editing a file with vi,
the window manager switches all my keystrokes to upper case so that
if I go to another open xterm I will get all upper case there.  
Usually, hitting the desktop menu "Restart fvwm" does fix it. I'm pretty
confident it's fvwm.

> Also, there is one other point. I have ported some sun xwindows
> motif programs to XFree86 and lesstif. I am now running on a
> pc with its display set to 1162 x 864  rather than the default
> 640x480.
> 
> This way every pc program comes up slightly smaller but 
> unfortunately all the motif programs come up full size.
> 
> I think it would be wonderful if I could tell fvwm to 
> scale all the motif or lesstif pixels to a different size or if fvwm
> could just read this off the current pcwindows setting.

You write:

 >> I think you are overestimating the involvment of the window
 >> manager.  Window managers wrap borders around windows
 >> but they don't control the display of every pixel inside
 >> the window.

It seems to me that the window manager has to place the app
on the desktop current-viewport according to the resources
specified in the app resources file.  I think this placement
and all other drawing would go through the window manager:
maybe not? Who would be responsible: lesstif? or XFree86?

 >> With Motif applications you can usually set X-Resources
 >> to cause Motif to use a different font depending on the screen
 >> size.  Heres something I use in my X-resources for controlling
 >> the Emacs window size:

That's how it should work, and I have written some apps which
start with the font and size the app depending on the font 
characteristics. I don't know of anyone else who has done that,
however. Even in your example, you still have to size the apps
using geometry: a very well behaved motif app should size itself
from the font characteristics, I think.

	#elif ( HEIGHT == 1200 ) /* My home machine, 1600x1200 use side x side layout */

If you can do this, why can't fvwm?

Anyway, I want to say again that I appreciate your comments: they
help me understand the issues better.

David

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: "Paul Smith" <[email-masked]>
Date: 14 Nov 2001 14:35:28 -0500

>>> FVWM cannot control the case of characters typed in your telnet

  d> Would that it were so.

But, it _IS_ so.

  d> But, unfortunately, I do start our in lower case and then after a
  d> while usually while editing a file with vi, the window manager
  d> switches all my keystrokes to upper case so that if I go to another
  d> open xterm I will get all upper case there.

This "mysterious combination of keys" that you mention almost certainly
consists of one and only one key: the CAPS LOCK key :).

If you set CAPS LOCK on your keyboard, then everything you type in all
your windows will be uppercase (unless, usually, you hit SHIFT-<letter>,
in which case <letter> will be _lowercase_).

Press CAPS LOCK again, and it will toggle off.  Another idea is to
rebind your CAPS LOCK key to do something else (be a CTRL modifier is a
common choice--that's what I do).  However, the window manager can't do
that either; use xmodmap to tell the X server what keybindings you want.

It's completely up to the _X server_ to manage all that stuff.  The X
server is the focal point: it controls the input devices (keyboard,
mouse, etc.) and the output device(s) (monitor), and when keyboard input
comes in it translates that into a keysym and sends it to the
appropriate client.

In _no_ way does _any_ of this involve the window manager.

  >>> but they don't control the display of every pixel inside

  d> It seems to me that the window manager has to place the app
  d> on the desktop current-viewport according to the resources
  d> specified in the app resources file.  I think this placement
  d> and all other drawing would go through the window manager:

No; that's not at all how it works.

  d> maybe not? Who would be responsible: lesstif? or XFree86?

The X server is ultimately responsible for drawing everything, and
handling things like clipping, etc.  You can think of an X window as a
frame, which is drawn by the window manager, and the contents, which are
created and drawn by the application.  Both the window manager and the
application talk directly to the X server: the application does _NOT_
send its draw requests to the WM.  The WM knows the dimensions of the
window, and it draws a border around it.  That's all it knows.

In fact, the WM is just an X application; there's nothing really that
special about it.

As for initial placement and sizing, the application can allow the WM to
be involved with deciding where the x/y offset of the window will be on
the screen, and it can allow the WM to resize the window (although the
application doesn't _have_ to allow any of this).

Once that is decided, it's completely up to the application, talking
directly to the X server, to draw the right pixels at the right
locations.

  >>> size.  Heres something I use in my X-resources for controlling

  d> That's how it should work, and I have written some apps which
  d> start with the font and size the app depending on the font 
  d> characteristics. I don't know of anyone else who has done that,
  d> however. Even in your example, you still have to size the apps
  d> using geometry: a very well behaved motif app should size itself
  d> from the font characteristics, I think.

  d> 	#elif ( HEIGHT == 1200 ) /* My home machine, 1600x1200 use side x side layout */

  d> If you can do this, why can't fvwm?

FVWM _could_ size _itself_ from the font characteristics (or vice versa).

But, FVWM cannot influence the font sizes, button sizes, or other
internal dimensions of _other applications_.

FVWM may be involved with deciding the x/y offset on the screen, and it
may be involved with deciding the total height and width of the outer
window (the one that it decorates with borders), but it is decidedly
_not_ involved, and cannot influence in any way, the way the application
uses that window space.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]> HASMAT--HA Software Mthds & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Dan Espen <[email-masked]>
Date: Wed, 14 Nov 2001 15:00:53 -0500

> _not_ involved, and cannot influence in any way, the way the application

This  stuff does seem  like magic, and its easy  to get confused about
what piece is doing what.

I  think Paul covered it  all (thanks Paul),  but I just want to point
out that I used screen height and geometry as an example.  If you want
your windows  bigger, you could use similar  logic in  the X Resources
file to pick  bigger fonts.  Every Motif  app I know  of will make the
windows bigger to accommodate the larger fonts.

Check out the xrdb man page.  You can even query the X server for
the X_RESOLUTION (pixels per meter) and pick the font based on
that.

-- 
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Perry Hutchison <[email-masked]>
Date: Wed, 14 Nov 2001 12:23:02 -0800 (PST)

> You can even query the X server for the X_RESOLUTION (pixels
> per meter) and pick the font based on that.

Some caution is needed here.  The report should be taken with a
grain of salt, since -- at least on a PC -- the X server may not
know the actual screen size.  It knows the screen is, say, 1200
pixels high; but it does not know for sure whether those 1200
pixels are spread over 30 cm or only 20 cm.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Marcus Lundblad <[email-masked]>
Date: Wed, 14 Nov 2001 21:36:05 +0100 (CET)

> pixels are spread over 30 cm or only 20 cm.

Actually I think it use Plug'n'Play to see what kind of monitor it is
(ptovided it is in the database). Can this be the case?

---

From: Perry Hutchison <[email-masked]>
Date: Wed, 14 Nov 2001 12:39:56 -0800 (PST)

> (ptovided it is in the database). Can this be the case?

Yes, if the video card and monitor support it.  Many older cards and
monitors do not.

---

From: Dan Espen <[email-masked]>
Date: Wed, 14 Nov 2001 15:46:30 -0500

> (ptovided it is in the database). Can this be the case?

I think Perry has a point.  On my Solaris machines I think its always
90x90dpi.  I don't know if XFree does a better job.