Changeset 4800

Show
Ignore:
Timestamp:
06/09/08 07:26:09 (4 months ago)
Author:
magi@…
Message:

Merged [4773] from trunk to 5.2 branch: Removes FF2 caret fix while moving/resizing, making it much faster; fixes #1751 (Window move 'tearing' (regression))

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/5.2/src/com/itmill/toolkit/terminal/gwt/client/ui/IWindow.java

    r4799 r4800  
    357357        } 
    358358        super.show(); 
    359         if (Util.isFF2()) { 
    360             // "missing cursor" browser bug workaround for FF2 in Windows and 
    361             // Linux 
     359 
     360        setFF2CaretFixEnabled(true); 
     361 
     362    } 
     363 
     364    private void setFF2CaretFixEnabled(boolean enable) { 
     365        // "missing cursor" browser bug workaround for FF2 in Windows andLinux 
     366        if (!Util.isFF2()) { 
     367            return; 
     368        } 
     369        if (enable) { 
    362370            DeferredCommand.addCommand(new Command() { 
    363371                public void execute() { 
     
    366374                    DOM.setStyleAttribute(getElement(), "overflow", "auto"); 
    367375                } 
     376 
    368377            }); 
    369         } 
     378        } else { 
     379            DOM.setStyleAttribute(getElement(), "overflow", ""); 
     380        } 
     381 
    370382    } 
    371383 
     
    425437    private void showDraggingCurtain(boolean show) { 
    426438        if (show && draggingCurtain == null) { 
    427             ApplicationConnection.getConsole().log("SHOW"); 
     439 
     440            setFF2CaretFixEnabled(false); // makes FF2 slow 
     441 
    428442            draggingCurtain = DOM.createDiv(); 
    429443            DOM.setStyleAttribute(draggingCurtain, "position", "absolute"); 
     
    437451            DOM.appendChild(RootPanel.getBodyElement(), draggingCurtain); 
    438452        } else if (!show && draggingCurtain != null) { 
    439             ApplicationConnection.getConsole().log("HIDE"); 
     453 
     454            setFF2CaretFixEnabled(true); // makes FF2 slow 
     455 
    440456            DOM.removeChild(RootPanel.getBodyElement(), draggingCurtain); 
    441457            draggingCurtain = null;