strange ncurses behaviour

This is a discussion on strange ncurses behaviour within the Linux Programming forums, part of the Platform Specific Boards category; hi all, we have a problem with ncurses. we use ncurses for handle menu and text. for draw a nice ...

  1. #1
    Registered User
    Join Date
    Sep 2012
    Posts
    5

    strange ncurses behaviour

    hi all,
    we have a problem with ncurses.


    we use ncurses for handle menu and text.
    for draw a nice background we write directly to /dev/fb0.


    this is the normal output: https://docs.google.com/file/d/0B0RH...NrQXlSS2s/edit


    after a random hits of UP/DOWN buttons, 3 black lines appear under the "Press [h] for help".


    this is the corrupted output: https://docs.google.com/file/d/0B0RH...it?usp=sharing


    background images are different but the bug should be clear.


    here you can find the ncurses menu handler: https://github.com/tux-mind/tf201-de...r/nGUI2.c#L432


    thanks for the help.


    bye!

  2. #2
    Registered User
    Join Date
    Jun 2009
    Posts
    4
    Quote Originally Posted by tux_mind View Post
    we use ncurses for handle menu and text.
    for draw a nice background we write directly to /dev/fb0.
    ncurses remembers where it thinks the cursor is; if you are writing
    to the screen outside of ncurses, you will confuse things and get
    the wrong output unless you ensure that the cursor goes back to
    where ncurses expects it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strange behaviour
    By cfanatic in forum C Programming
    Replies: 2
    Last Post: 07-16-2012, 07:41 AM
  2. strange behaviour
    By cfanatic in forum C Programming
    Replies: 9
    Last Post: 07-13-2012, 11:41 PM
  3. ncurses Strange Keys
    By MTK in forum C Programming
    Replies: 3
    Last Post: 09-16-2009, 10:34 AM
  4. Strange behaviour of GCC
    By BlackOps in forum C Programming
    Replies: 14
    Last Post: 07-29-2009, 07:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21