Menu

#24 Redraw problems with XmTextDisableRedisplay()

open
nobody
Xm library (13)
5
2009-04-29
2008-01-03
No

If we call XmTextDisableRedisplay() on a scrolling text widget before adding a large amount of text, then we see the text that should be scrolled off the top redrawn at the first line of the widget before being overwritten by the text that should be displayed.

Through some hacking of the sources to get an assert failure and stack trace when the behavior occurred, I tracked it down to the ChangeHOffset() function (in TextOut.c) calling the expose function regardless of whether or not redisplay was disabled.

I patched the code to return instead of calling the expose function if redisplay has been disabled. However, I'm not entirely sure that this is correct, so it would be good if someone who knows the code takes a look.

I'm attaching the stack trace from my testing session which shows the calling sequence as well as my patch file, which is a diff against TextOut.c, revision 1.10, which seems to be the current version.

Scott MacHaffie

Discussion

  • Scott MacHaffie

    Scott MacHaffie - 2008-01-03

    Patch for the problem

     
  • Scott MacHaffie

    Scott MacHaffie - 2008-01-03

    Stack trace showing calling sequence

     
  • Scott MacHaffie

    Scott MacHaffie - 2008-01-03

    Logged In: YES
    user_id=1932242
    Originator: YES

    File Added: stack_trace.txt

     
  • Paul Gevers

    Paul Gevers - 2009-04-29
    • labels: 103129 --> Xm library
     
  • Paul Gevers

    Paul Gevers - 2009-04-29

    Thanks for reporting this bug and providing a patch. I am new to lesstif, but I am going to try and clean up the source code a little bit. I change the status of this bug to patches and will look at it later.

     

Log in to post a comment.