nanogui: Re: Window position
Re: [nanogui] Window position
"Greg Haerr" ####@####.####
9 Feb 2012 03:04:06 -0000
: GR_ROOT_WINDOW_ID, 0, 0, 250, 90, WHITE);
: but the window is placed quite a bit below the upper left corner and to
: right side of the screen or X Window. Just as if 0,0 is translated to
: by nano-X.
By default, even though the coordinates for the window
are specified in GrNewWindow, when the window manager
is running (or linked in), then the specified window coordinates
are ignored and the window manager places the window
according to its internal next window position. This can
be turned off my setting a flag using the GrSetWMProperties
function, prior to calling GrMapWindow.
: Another problem is that if you pull the window with the mouse in the lower
: right corner, it gets cleared. It will be redrawn only when the window
: is decreased a little bit again. Is there a solution for that?
The clearing is likely the erase background code running
in the server. A window resize message is sent, which is
probably not being processed by your application. The
standard expose event is not sent unless there are portions
of the window being exposed, which isn't always the case
when the window size decreases. Check some of the
sample programs to see how the redraw code is called
not only on expose events but on resize events.