Author: post
Date: 2012-09-15 14:18:35 +0200 (Sat, 15 Sep 2012)
New Revision: 4281

Modified:
   trunk/src/rs-preview-widget.c
Log:
Make scrollbar adjustments rendering asynchronious. Doesn't fix the "mouse gets 
stuck on scrollbars and other weird stuff happening while the icon store is 
loading images", but makes it at least bearable. *sigh*

Modified: trunk/src/rs-preview-widget.c
===================================================================
--- trunk/src/rs-preview-widget.c       2012-09-04 21:57:46 UTC (rev 4280)
+++ trunk/src/rs-preview-widget.c       2012-09-15 12:18:35 UTC (rev 4281)
@@ -59,6 +59,7 @@
        DRAW_ROI         = 0x11C0, /* 0001 0001 1100 0000 */
 
        MOVE             = 0x4000, /* 0100 0000 0000 0000 */
+       SCROLL           = 0x8000, /* 8000 0000 0000 0000 */
 } STATE;
 
 /* In win32 windef32.h will define both near and NEAR */
@@ -1669,6 +1670,8 @@
        RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data);
 
        rs_preview_widget_quick_start(preview, TRUE);
+       if (preview->state == WB_PICKER)
+               preview->state = SCROLL;
 
        return FALSE;
 }
@@ -1678,6 +1681,8 @@
 {
        RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data);
 
+       if (preview->state == SCROLL)
+               preview->state = WB_PICKER;
        GTK_CATCHUP();
        rs_preview_widget_quick_end(preview);
 
@@ -1688,7 +1693,6 @@
 adjustment_changed(GtkAdjustment *adjustment, gpointer user_data)
 {
        RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data);
-
        if (!preview->zoom_to_fit)
        {
                /* Update Screen */
@@ -2931,6 +2935,9 @@
                        (preview->state & STRAIGHTEN_MOVE) ||
                        (preview->views > 1);
 
+       if (preview->state == SCROLL)
+               direct_redraw = FALSE;
+
        /* The first re-draw cannot be asynchronious, since it will flicker */
        if (preview->last_required_direct_redraw && !direct_redraw)
        {


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to