Changeset 84a4aca


Ignore:
Timestamp:
Jun 1, 2010, 12:12:39 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
f6fae8d
Parents:
908de44
Message:
Add a cursor-tracking mechanism to owl_window
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • window.c

    ra57f87a r84a4aca  
    4444static void _owl_window_redraw_cleanup(owl_window *w, WINDOW *win);
    4545
     46static owl_window *cursor_owner;
     47
    4648G_DEFINE_TYPE (OwlWindow, owl_window, G_TYPE_OBJECT)
    4749
     
    327329/** Painting and book-keeping **/
    328330
     331void owl_window_set_cursor(owl_window *w)
     332{
     333  cursor_owner = w;
     334  g_object_add_weak_pointer(G_OBJECT(w), (gpointer*) &cursor_owner);
     335}
     336
    329337void owl_window_dirty(owl_window *w)
    330338{
     
    374382  _owl_window_redraw_subtree(owl_window_get_screen());
    375383  update_panels();
     384  if (cursor_owner && cursor_owner->win)
     385    wnoutrefresh(cursor_owner->win);
    376386}
    377387
  • window.h

    r7a6e6c7 r84a4aca  
    4343int owl_window_is_toplevel(owl_window *w);
    4444
     45void owl_window_set_cursor(owl_window *w);
     46
    4547void owl_window_dirty(owl_window *w);
    4648void owl_window_dirty_children(owl_window *w);
Note: See TracChangeset for help on using the changeset viewer.