[Novalug] X-windows resize events.

Gary Knott garyknott@gmail.com
Fri Oct 12 16:57:28 EDT 2012


Dear Ed, thanks for your remarks on dealing with resizing.  What you sketched
is what i am complaining about.   I basically want to do it
the way windows allows  (Windows designs some things ok, and some not,
just like everyone else.)

Windows "sends a message"  i.e. queues an event, when the
mouse goes down in the border of your window - then you can grab
the size, etc. if you want.  Then a bunch of messages about the
resizing occur, just like X-windows, (all of which I ignore.) But, then
you get a message for the mouse button up action (with some other
message name like "resize complete".)  NOW, we can get the new size
and position of our window and repaint it.  In other words, i do not
want to repaint all the intermediate windows that
 arise as resizing is going on.  Programs that do this
in windows (i.e., ignore intermediate reports on the resizing)
show a series of black-rectangles as the resizing is happening, courtesy
of the Windows window manger.

As far as i know X does not have a final "mouse-up in the border" that
I can catch.

-------

The way I ended-up doing (raw-mode) char input was
to write a char input routine that says:

if X has been started and I have asked it to start queuing events and not
stopped X, then  use keyup and down events and a lot of code to map
keycodes to chars and
handle ^C to input  chars.  Otherwise, call getc, or some such, I
forget exactly,
to read my next char.

My input char routine is basically:  inputchar(&c, waitsw, echosw)
where the output is returned in c  (or -1 if there is a ^C or -2 (or
something - maybe 0)
if there is no char and waitsw is false.)  So I can either wait or not
wait, and echo
or not echo.  And do it independent of whether X is active or not.
(The X programmers should have provided this fct along with the rest of X.)


gary knott,  garyknott@gmail.com



More information about the Novalug mailing list