nanogui: Thread: Re: Window position


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Re: [nanogui] Window position
From: "Georg Potthast" ####@####.####
Date: 8 Feb 2012 20:38:27 -0000
Message-Id: <001501cce6a1$6ec41890$7c01a8c0@SCHREIBTISCHGP>

Hi Greg,

I observed that Nano-X does not place a window in the upper left corner if 
instructed to do so. In the arcdemo.c code for example it says:

wid = 
GrNewWindowEx(GR_WM_PROPS_BORDER|GR_WM_PROPS_CAPTION|GR_WM_PROPS_CLOSEBOX, 
"arcdemo",
GR_ROOT_WINDOW_ID, 0, 0, 250, 90, WHITE);

but the window is placed quite a bit below the upper left corner and to the 
right side of the screen or X Window. Just as if 0,0 is translated to 20,20 
by nano-X.

This causes that a window in FLTK can also not be set into the upper left 
corner. I would like to do that to get a proper fullscreen window on the 
screen.

______________________________________________

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 size 
is decreased a little bit again. Is there a solution for that?

Georg 

Subject: Re: [nanogui] Window position
From: "Greg Haerr" ####@####.####
Date: 9 Feb 2012 03:04:06 -0000
Message-Id: <8ABCAF3559E54757B7B66A485D3A3BA1@winXP>

: GrNewWindowEx(GR_WM_PROPS_BORDER|GR_WM_PROPS_CAPTION|GR_WM_PROPS_CLOSEBOX,
: "arcdemo",
: GR_ROOT_WINDOW_ID, 0, 0, 250, 90, WHITE);
:
: but the window is placed quite a bit below the upper left corner and to 
the
: right side of the screen or X Window. Just as if 0,0 is translated to 
20,20
: 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 
size
: 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.

Regards,

Greg 

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.