Changeset 3442788


Ignore:
Timestamp:
May 9, 2012, 3:05:36 PM (12 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.9
Children:
70a76f3, 2354e9a, 3f98443
Parents:
e6e7842
git-author:
David Benjamin <davidben@mit.edu> (03/18/12 16:17:51)
git-committer:
David Benjamin <davidben@mit.edu> (05/09/12 15:05:36)
Message:
Hide the default cursor with curs_set if supported

Then we don't leave it randomly at the right of the sepbar.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • window.c

    reba02ec r3442788  
    397397}
    398398
    399 static owl_window *_get_cursor(void)
    400 {
     399static owl_window *_get_cursor(bool *is_default)
     400{
     401  *is_default = false;
    401402  if (cursor_owner && owl_window_is_realized(cursor_owner))
    402403    return cursor_owner;
     404  *is_default = true;
    403405  if (default_cursor && owl_window_is_realized(default_cursor))
    404406    return default_cursor;
     
    486488  owl_window *cursor;
    487489  owl_window *screen = owl_window_get_screen();
     490  bool default_cursor;
    488491
    489492  if (!screen->dirty_subtree)
     
    491494  _owl_window_redraw_subtree(screen);
    492495  update_panels();
    493   cursor = _get_cursor();
     496  cursor = _get_cursor(&default_cursor);
    494497  if (cursor && cursor->win) {
     498    /* If supported, hide the default cursor. */
     499    curs_set(default_cursor ? 0 : 1);
    495500    /* untouch it to avoid drawing; window should be clean now, but we must
    496501     * clean up in case there was junk left over on a subwin (cleaning up after
Note: See TracChangeset for help on using the changeset viewer.