#390 win terminal: display of mouse coordinates garbled

closed-fixed
nobody
None
2
2008-04-24
2006-07-11
No

The display of mouse coordinates of the win terminal
get's garbled sometimes on my WinXP machine.

This can be reproduced e.g. by moving the plot window
partialy of the screen. When the window is moved
back onto the screen the mouse coordinate display in
the lower left corner is garbled.

Looking at the code I see that there's some XOR
operation involved. Could it be that somehow the XOR
mechanism and the window content get out of sync?

This is a cosmetic issue and in my opinion not
release critical for 4.2.

Discussion

1 2 > >> (Page 1 of 2)
    • priority: 5 --> 2
     
  • Petr Mikulik
    Petr Mikulik
    2006-07-11

    Logged In: YES
    user_id=31505

    This "feature" is there since the beginning. It happens on
    all Win*. Nobody knew how to fix it. Fix would be very welcome.

     
  • Dan Sebald
    Dan Sebald
    2006-07-12

    Logged In: YES
    user_id=704782

    Actually, what Petr said isn't correct. This happens in X11
    for me and I can note the time it started happening. There
    is a series of discussions titled:

    Shredded X11 coordinate text bug

    on 9/13/2004. This started about three months before that
    time. (See the discussion in the archive.) I recall this
    working fine before then, e.g. 4.0.

     
  • Petr Mikulik
    Petr Mikulik
    2006-07-12

    Logged In: YES
    user_id=31505

    I commented on the windows terminal, not x11.

     
  • Logged In: YES
    user_id=27517

    To put this into some perspective: I can tell you why it
    happens, and I'm reasonably sure I can fix it --- but with a
    serious drawback.

    The garbling happens because wgraph.c does all drawing of
    highly volatile objects in the usual way applied for mouse
    pointers: XOR. The problem with that technique is that
    sometimes, changes to the content of the relevant piece of
    the window can happen outside the control or knowledge of
    wgraph.c. XOR drawing can't compensate for such faults, so
    they become permanent until the next full redraw.

    The superficially easy solution would be to user
    clear-and-redraw instead of XOR --- but that leads to
    unbearable blinking, particularly for the coordinate display.

     
  • Petr Mikulik
    Petr Mikulik
    2006-07-18

    Logged In: YES
    user_id=31505

    It could be fixed by extending the graphics window when in
    "set mouse" mode -- like hitting "m" hotkey several times in
    x11. Then, XOR could be used for refreshes, while full
    redrawn of that "status bar" area when the window has been
    moved/resized/overdrawn (if the gnuplot window can detect
    these events).

     
  • Logged In: YES
    user_id=27517

    Playing with the window size is an unrelated issue that can
    only distract us from the real issue here.

    The problem is that the code doesn't know when a complete
    redraw has to be performed --- i.e. it wouldn't know when to
    resize the window, either.

     
  • Logged In: YES
    user_id=1180072

    I think the idea is to have the display of the plot and
    and the coordinates seperate, which requires (in some sense)
    a bigger window. The we could omit using XOR operations
    at all and avoid the flickering you talked about. We just
    always do full redraws.

     
  • Logged In: YES
    user_id=27517

    > I think the idea is to have the display of the plot and
    > and the coordinates seperate, which requires (in some sense)
    > a bigger window.

    That's not really an idea --- we already *have* that bigger
    window. The mouse coordinates area is kept in mouse-off mode.

    > The we could omit using XOR operations
    > at all and avoid the flickering you talked about. We just
    > always do full redraws.

    No. You can either do full redraws every time, or you can
    avoid flickering, but never both. Flicker is exactly what
    you get from redrawing on every update.

     
  • Logged In: YES
    user_id=1180072

    >> I think the idea is to have the display of the plot and
    >> and the coordinates seperate, which requires (in some
    >sense)
    >> a bigger window.
    >
    >That's not really an idea --- we already *have* that
    >bigger
    >window. The mouse coordinates area is kept in mouse-off >mode.

    Sure about that? Why do e.g. interfere with mouse coordinate
    display then?

    >> The we could omit using XOR operations
    >> at all and avoid the flickering you talked about. We just
    >> always do full redraws.
    >
    >No. You can either do full redraws every time, or you can
    >avoid flickering, but never both. Flicker is exactly what
    >you get from redrawing on every update.

    No. Full redraws do not necessarily include erasing the
    area first. E.g. look at wtext.c: not a single xor
    operation and no flickering either.

     
1 2 > >> (Page 1 of 2)