Changeset a5603ff in mainline


Ignore:
Timestamp:
2010-01-07T19:41:39Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eb0bc90
Parents:
eca2435 (diff), 8190e63 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge supression of cursor noise in editor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/edit/edit.c

    reca2435 ra5603ff  
    9898static bool done;
    9999static pane_t pane;
     100static bool cursor_visible;
    100101
    101102static int scr_rows, scr_columns;
     
    108109/** Maximum filename length that can be entered. */
    109110#define INFNAME_MAX_LEN 128
     111
     112static void cursor_show(void);
     113static void cursor_hide(void);
     114static void cursor_setvis(bool visible);
    110115
    111116static void key_handle_unmod(console_event_t const *ev);
     
    199204
    200205        /* Initial display */
     206        cursor_visible = true;
     207
     208        cursor_hide();
    201209        console_clear(con);
    202210        pane_text_display();
     
    205213                status_display("File not found. Starting empty file.");
    206214        pane_caret_display();
    207 
     215        cursor_show();
    208216
    209217        done = false;
     
    230238                /* Redraw as necessary. */
    231239
     240                cursor_hide();
     241
    232242                if (pane.rflags & REDRAW_TEXT)
    233243                        pane_text_display();
     
    238248                if (pane.rflags & REDRAW_CARET)
    239249                        pane_caret_display();
     250
     251                cursor_show();
    240252        }
    241253
     
    243255
    244256        return 0;
     257}
     258
     259static void cursor_show(void)
     260{
     261        cursor_setvis(true);
     262}
     263
     264static void cursor_hide(void)
     265{
     266        cursor_setvis(false);
     267}
     268
     269static void cursor_setvis(bool visible)
     270{
     271        if (cursor_visible != visible) {
     272                console_cursor_visibility(con, visible);
     273                cursor_visible = visible;
     274        }
    245275}
    246276
Note: See TracChangeset for help on using the changeset viewer.