Changeset 2a17b63 for select.c


Ignore:
Timestamp:
Jan 7, 2010, 6:54:15 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.6, release-1.7, release-1.8, release-1.9
Children:
10557e6
Parents:
a999d9e
git-author:
Nelson Elhage <nelhage@mit.edu> (12/30/09 17:52:20)
git-committer:
Nelson Elhage <nelhage@mit.edu> (01/07/10 18:54:15)
Message:
Push and pop contexts whenever we change context.

This allows us to get rid of the awful hack in owl_process_input_char,
and opens the path to being able to invoke popup windows from the
editwin and vice versa (In fact, you can now do so without
segfaulting, although the display layer does not yet quite do the
right thing).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • select.c

    rb752f1e r2a17b63  
    261261{
    262262  int ret;
    263   owl_popwin *pw;
    264   owl_editwin *tw;
    265263
    266264  owl_global_set_lastinputtime(&g, time(NULL));
    267   pw=owl_global_get_popwin(&g);
    268   tw=owl_global_get_typwin(&g);
    269 
    270   owl_global_set_lastinputtime(&g, time(NULL));
    271   /* find and activate the current keymap.
    272    * TODO: this should really get fixed by activating
    273    * keymaps as we switch between windows...
    274    */
    275   if (pw && owl_popwin_is_active(pw) && owl_global_get_viewwin(&g)) {
    276     owl_context_set_popless(owl_global_get_context(&g),
    277                             owl_global_get_viewwin(&g));
    278     owl_function_activate_keymap("popless");
    279   } else if (owl_global_is_typwin_active(&g)
    280              && owl_editwin_get_style(tw)==OWL_EDITWIN_STYLE_ONELINE) {
    281     /*
    282       owl_context_set_editline(owl_global_get_context(&g), tw);
    283       owl_function_activate_keymap("editline");
    284     */
    285   } else if (owl_global_is_typwin_active(&g)
    286              && owl_editwin_get_style(tw)==OWL_EDITWIN_STYLE_MULTILINE) {
    287     owl_context_set_editmulti(owl_global_get_context(&g), tw);
    288     owl_function_activate_keymap("editmulti");
    289   } else {
    290     owl_context_set_recv(owl_global_get_context(&g));
    291     owl_function_activate_keymap("recv");
    292   }
    293   /* now actually handle the keypress */
    294265  ret = owl_keyhandler_process(owl_global_get_keyhandler(&g), j);
    295266  if (ret!=0 && ret!=1) {
Note: See TracChangeset for help on using the changeset viewer.