#248 XDrawRectangles bad in rootless?

Rootless (76)

First of all, thank you for all your hard work on
porting XFree to OS X/Darwin.

Unfortunately, though, there seems to be a problem with
drawing rectangles in Rootless mode, though it works
fine in FullScreen mode. Two examples I've noticed are
resizing windows using FVWM2 and drawing rectangles on
plots in Matlab on an exported display. (_Not_ Matlab
for OS X. Running Matlab on a Linux machine and
exporting the display to XDarwin.) Here is a more
detailed description of what happens in FVWM2.

Start XDarwin (XFree in FullScreen mode, start
FVWM2 from xinitrc, and run an XTerm. When resizing the
window, a black outline of the window with a 3x3 grid
of rectangles is drawn that shows the size of the
window after resizing. This outline follows the mouse
movement. Shutdown XServer.

Start XDarwin in Rootless mode and again start FVWM2
and an XTerm. When resizing the window, there is no
outline. However, resizing _does_ work.

This is also true for moving windows.

This does not appear to be a bug with FVWM2, since it
also occurs when running TWM instead of FVWM2, though
they may have similar ancestry (?). In FullScreen mode,
TWM works fine, but is missing the rectangular outlines
in Rootless mode.

This does not happen in OroborusOSX.

Tried replacing XDarwin with Apple's X11 pre-beta, and
this problem still exists with FVWM2.

Searching through the source code for FVWM2
(fvwm-2.4.13.tar.gz -- I compiled my FVWM from this
source), the resizing seems to be handled by
fvwm/move_resize.c, and the outline drawing in the
function 'static void draw_move_resize_grid'. The
drawing of the outline rectangles seems to be called by
'XDrawRectangles(dpy, Scr.Root, Scr.XorGC, rects,
10);'. I have no experience with X programming, so
please forgive my ignorance, but XDrawRectangles seems
to be a function provided by XLib. Searching (greping),
rather hastily I must admit, through the source for
OroborusOSX, there doesn't seem to be a reference to
XDrawRectangles in resizing windows. (I assume it calls
native OSX api's?) At this point, I gave up on my
search, as it appeared I would need to search through
the XFree cvs source (?), and with no prior experience,
I was too intimidated to continue.

If there is anything missing or something I should try,
please let me know. (I tried searching past bugs, and
didn't find anything, but I could've missed it.)

johnchoi \AT caltech \DOT edu


  • Torrey T. Lyons

    Torrey T. Lyons - 2003-06-02
    • assigned_to: nobody --> torrey
    • status: open --> open-later
  • Torrey T. Lyons

    Torrey T. Lyons - 2003-06-02

    Logged In: YES

    The cases you mention are when the X client is trying to draw to the root
    window of the X11 display. In rootless mode, there is no root window. Thus
    you don't get move or resize indicators in several popular window managers
    including twm or fvwm2. We have toyed with ways of displaying temporary
    things like this that applications may draw to the root window, but it is a
    tricky problem. This is more a feature request then a bug.

  • Torrey T. Lyons

    Torrey T. Lyons - 2003-08-14
    • status: open-later --> closed-later
  • Torrey T. Lyons

    Torrey T. Lyons - 2003-08-14

    Logged In: YES

    Closing as this is expected behavior. We have this logged as a
    feature request. Please note that many window managers allow
    you to use opaque resizing which fixes this problem.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks