Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 12066 Details for
Bug 65269
GTK issues paints to obscured widget [WAS: [EditorMgmt] Slow redraw/relayout when maximizing/unmaximizing an editor]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch for RC2
patch.txt (text/plain), 7.67 KB, created by
Silenio Quarti
on 2004-06-14 14:44:46 EDT
(
hide
)
Description:
Patch for RC2
Filename:
MIME Type:
Creator:
Silenio Quarti
Created:
2004-06-14 14:44:46 EDT
Size:
7.67 KB
patch
obsolete
>Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java,v >retrieving revision 1.205 >diff -u -r1.205 Control.java >--- Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java 11 Jun 2004 16:01:21 -0000 1.205 >+++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java 14 Jun 2004 18:32:11 -0000 >@@ -182,15 +182,11 @@ > > /* Connect the paint signal */ > int /*long*/ paintHandle = paintHandle (); >- /* This code is intentionaly commented */ >-// int paintMask = OS.GDK_EXPOSURE_MASK | OS.GDK_VISIBILITY_NOTIFY_MASK; >-// OS.gtk_widget_add_events (paintHandle, paintMask); >-// OS.g_signal_connect (paintHandle, OS.expose_event, windowProc3, -EXPOSE_EVENT); >-// OS.g_signal_connect_after (paintHandle, OS.expose_event, windowProc3, EXPOSE_EVENT); >-// OS.g_signal_connect_after (paintHandle, OS.visibility_notify_event, windowProc3, VISIBILITY_NOTIFY_EVENT); >- int paintMask = OS.GDK_EXPOSURE_MASK; >+ int paintMask = OS.GDK_EXPOSURE_MASK | OS.GDK_VISIBILITY_NOTIFY_MASK; > OS.gtk_widget_add_events (paintHandle, paintMask); >+ OS.g_signal_connect (paintHandle, OS.expose_event, windowProc3, -EXPOSE_EVENT); > OS.g_signal_connect_after (paintHandle, OS.expose_event, windowProc3, EXPOSE_EVENT); >+ OS.g_signal_connect_after (paintHandle, OS.visibility_notify_event, windowProc3, VISIBILITY_NOTIFY_EVENT); > > /* Connect the Input Method signals */ > OS.g_signal_connect_after (handle, OS.realize, windowProc2, REALIZE); >@@ -224,7 +220,13 @@ > } > > int /*long*/ paintHandle () { >- return handle; >+ int /*long*/ topHandle = topHandle (); >+ int /*long*/ paintHandle = handle; >+ while (paintHandle != topHandle) { >+ if ((OS.GTK_WIDGET_FLAGS (paintHandle) & OS.GTK_NO_WINDOW) == 0) break; >+ paintHandle = OS.gtk_widget_get_parent (paintHandle); >+ }; >+ return paintHandle; > } > > int /*long*/ paintWindow () { >@@ -3183,7 +3185,7 @@ > // checkWidget(); > if ((OS.GTK_WIDGET_FLAGS (handle) & OS.GTK_REALIZED) == 0) return; > int /*long*/ window = paintWindow (); >- display.flushExposes (); >+ display.flushExposes (window, all); > OS.gdk_window_process_updates (window, all); > } > } >Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java,v >retrieving revision 1.154 >diff -u -r1.154 Display.java >--- Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java 11 Jun 2004 16:01:21 -0000 1.154 >+++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java 14 Jun 2004 18:32:12 -0000 >@@ -173,6 +173,16 @@ > int /*long*/ pixbufCellDataProc; > Callback pixbufCellDataCallback; > >+ /* Flush exposes */ >+ int /*long*/ checkIfEventProc; >+ Callback checkIfEventCallback; >+ int /*long*/ flushWindow; >+ boolean flushAll; >+ GdkRectangle flushRect = new GdkRectangle (); >+ XExposeEvent exposeEvent = new XExposeEvent (); >+ XVisibilityEvent visibilityEvent = new XVisibilityEvent (); >+ int /*long*/ [] flushData = new int /*long*/ [1]; >+ > /* Drag Detect */ > int dragStartX,dragStartY; > boolean dragging; >@@ -573,6 +583,62 @@ > } > } > >+int /*long*/ checkIfEventProc (int /*long*/ display, int /*long*/ xEvent, int /*long*/ userData) { >+ OS.memmove (exposeEvent, xEvent, XExposeEvent.sizeof); >+ switch (exposeEvent.type) { >+ case OS.VisibilityNotify: >+ case OS.Expose: >+ case OS.GraphicsExpose: >+ break; >+ default: >+ return 0; >+ } >+ int /*long*/ window = OS.gdk_window_lookup (exposeEvent.window); >+ if (window == 0) return 0; >+ if (flushWindow != 0) { >+ if (flushAll) { >+ int /*long*/ tempWindow = window; >+ do { >+ if (tempWindow == flushWindow) break; >+ } while ((tempWindow = OS.gdk_window_get_parent (tempWindow)) != 0); >+ if (tempWindow != flushWindow) return 0; >+ } else { >+ if (window != flushWindow) return 0; >+ } >+ } >+ switch (exposeEvent.type) { >+ case OS.Expose: >+ case OS.GraphicsExpose: { >+ flushRect.x = exposeEvent.x; >+ flushRect.y = exposeEvent.y; >+ flushRect.width = exposeEvent.width; >+ flushRect.height = exposeEvent.height; >+ OS.gdk_window_invalidate_rect (window, flushRect, true); >+ exposeEvent.type = -1; >+ OS.memmove (xEvent, exposeEvent, XExposeEvent.sizeof); >+ break; >+ } >+ case OS.VisibilityNotify: { >+ OS.memmove (visibilityEvent, xEvent, XVisibilityEvent.sizeof); >+ OS.gdk_window_get_user_data (window, flushData); >+ int /*long*/ handle = flushData [0]; >+ Widget widget = handle != 0 ? getWidget (handle) : null; >+ if (widget != null && widget instanceof Control) { >+ Control control = (Control) widget; >+ if (window == control.paintWindow ()) { >+ if (visibilityEvent.state == OS.VisibilityFullyObscured) { >+ control.state |= Widget.OBSCURED; >+ } else { >+ control.state &= ~Widget.OBSCURED; >+ } >+ } >+ } >+ break; >+ } >+ } >+ return 0; >+} >+ > /** > * Checks that this class can be subclassed. > * <p> >@@ -838,24 +904,17 @@ > return getWidget (handle); > } > >-void flushExposes () { >+void flushExposes (int /*long*/ window, boolean all) { > OS.gdk_flush (); > OS.gdk_flush (); > if (OS.GDK_WINDOWING_X11 ()) { >- GdkRectangle rect = new GdkRectangle (); >- XExposeEvent exposeEvent = new XExposeEvent (); >+ this.flushWindow = window; >+ this.flushAll = all; > int /*long*/ xDisplay = OS.GDK_DISPLAY (); > int /*long*/ xEvent = OS.g_malloc (XEvent.sizeof); >- while (OS.XCheckMaskEvent (xDisplay, OS.ExposureMask, xEvent)) { >- OS.memmove (exposeEvent, xEvent, XExposeEvent.sizeof); >- rect.x = exposeEvent.x; >- rect.y = exposeEvent.y; >- rect.width = exposeEvent.width; >- rect.height = exposeEvent.height; >- int /*long*/ window = OS.gdk_window_lookup (exposeEvent.window); >- if (window != 0) OS.gdk_window_invalidate_rect (window, rect, true); >- } >+ OS.XCheckIfEvent (xDisplay, xEvent, checkIfEventProc, 0); > OS.g_free (xEvent); >+ this.flushWindow = 0; > } > } > >@@ -1762,6 +1821,10 @@ > pixbufCellDataCallback = new Callback (this, "pixbufCellDataProc", 5); > pixbufCellDataProc = pixbufCellDataCallback.getAddress (); > if (pixbufCellDataProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); >+ >+ checkIfEventCallback = new Callback (this, "checkIfEventProc", 3); >+ checkIfEventProc = checkIfEventCallback.getAddress (); >+ if (checkIfEventProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); > } > > void initializeWidgetTable () { >@@ -2290,6 +2353,10 @@ > windowCallback3.dispose (); windowCallback3 = null; > windowCallback4.dispose (); windowCallback4 = null; > windowCallback5.dispose (); windowCallback5 = null; >+ >+ /* Dispose checkIfEvent callback */ >+ checkIfEventCallback.dispose(); checkIfEventCallback = null; >+ checkIfEventProc = 0; > > /* Dispose preedit window */ > if (preeditWindow != 0) OS.gtk_widget_destroy (preeditWindow); >@@ -2971,7 +3038,7 @@ > */ > public void update () { > checkDevice (); >- flushExposes (); >+ flushExposes (0, true); > OS.gdk_window_process_all_updates (); > } > >Index: Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java,v >retrieving revision 1.292 >diff -u -r1.292 OS.java >--- Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java 10 Jun 2004 22:02:36 -0000 1.292 >+++ Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java 14 Jun 2004 18:32:12 -0000 >@@ -224,6 +224,7 @@ > public static final int GTK_MESSAGE_WARNING = 1; > public static final int GTK_MESSAGE_QUESTION = 2; > public static final int GTK_MESSAGE_ERROR = 3; >+ public static final int GTK_NO_WINDOW = 1 << 5; > public static final int GTK_ORIENTATION_HORIZONTAL = 0x0; > public static final int GTK_ORIENTATION_VERTICAL = 0x1; > public static final int GTK_POLICY_ALWAYS = 0x0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 65269
:
11451
|
11452
|
11453
|
11454
|
11456
| 12066 |
12071
|
12073
|
12076
|
12077
|
12078
|
12093
|
12094