Changeset 8346

Show
Ignore:
Timestamp:
29/01/12 11:04:55 (4 months ago)
Author:
westram
Message:
  • expect context in ED4_root::special_window_refresh
  • provide context from ED4_cursor::delete_cursor
Location:
branches/e4fix/EDIT4
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • branches/e4fix/EDIT4/ED4_cursor.cxx

    r8345 r8346  
    362362    if (window()->get_device()->reduceClipBorders(ymin-EXPAND_SIZE, ymax+1+EXPAND_SIZE, xmin-EXPAND_SIZE, xmax+1+EXPAND_SIZE)) { 
    363363        // refresh terminal to hide cursor 
     364        ED4_LocalWinContext uses(window()); 
    364365        bool previous = allowed_to_draw; 
    365366        allowed_to_draw = false; 
  • branches/e4fix/EDIT4/ED4_main.cxx

    r8342 r8346  
    648648    AWT_install_postcb_cb(ED4_postcbcb); 
    649649    AWT_install_cb_guards(); 
    650     e4_assert(ED4_WinContext::dont_have_global_context()); // context shall be local 
     650    e4_assert(!ED4_WinContext::have_context()); // no global context shall be active 
    651651    ED4_ROOT->aw_root->main_loop(); // enter main-loop 
    652652 
  • branches/e4fix/EDIT4/ED4_root.cxx

    r8345 r8346  
    127127ED4_returncode ED4_root::special_window_refresh() { 
    128128    // this function should only be used for window specific updates (i.e. cursor placement) 
     129 
     130    e4_assert(ED4_WinContext::have_context()); 
     131     
    129132    bool redraw = true;  
    130133    handle_update_requests(redraw); // @@@ problematic (causes refresh w/o win-context) 
  • branches/e4fix/EDIT4/ed4_class.hxx

    r8345 r8346  
    14251425    AW_device  *device; 
    14261426 
    1427     bool have_context() const { return ed4w; } 
     1427    bool is_set() const { return ed4w; } 
    14281428    void init(ED4_window *ew) { 
    14291429        e4_assert(ew); 
     
    14331433 
    14341434    void warn_missing_context() const; 
    1435     void expect_context() const { if (!have_context()) warn_missing_context(); } 
     1435    void expect_context() const { if (!is_set()) warn_missing_context(); } 
    14361436 
    14371437protected: 
     
    14471447 
    14481448    static const ED4_WinContext& get_current_context() { return current_context; } 
    1449     static bool dont_have_global_context() { return !current_context.have_context(); } 
     1449    static bool have_context() { return current_context.is_set(); } 
    14501450}; 
    14511451 
     
    15611561public: 
    15621562    ED4_MostRecentWinContext() : most_recent(0) { 
    1563         if (ED4_WinContext::dont_have_global_context()) { 
     1563        if (!ED4_WinContext::have_context()) { 
    15641564            most_recent = new ED4_LocalWinContext(ED4_ROOT->get_most_recently_used_window()); 
    15651565        }