2001-03-10  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.def : updated

	* gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
	to offseting the clip_mask at the right place

	* gdk/win32/gdkwindow-win32.c : don't create background brushes
	for all the gdkClasses, especially not for the input_only case.
	Otherwise flickering wont be avoidable, because we don't get
	WM_ERASEBKGND message for these windows.

	* gdk/win32/gdkevents-win32.c : initialize event->expose.region
	and fixed massive redraw problems apparently triggered by Alexanders
	recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
	but it seems to work quite well :-)

	* gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
	prototype
This commit is contained in:
Hans Breuer 2001-03-10 18:13:03 +00:00 committed by Hans Breuer
parent d9582bd3e4
commit 0f6d1b4a27
12 changed files with 200 additions and 46 deletions

View File

@ -1,3 +1,23 @@
2001-03-10 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated
* gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
to offseting the clip_mask at the right place
* gdk/win32/gdkwindow-win32.c : don't create background brushes
for all the gdkClasses, especially not for the input_only case.
Otherwise flickering wont be avoidable, because we don't get
WM_ERASEBKGND message for these windows.
* gdk/win32/gdkevents-win32.c : initialize event->expose.region
and fixed massive redraw problems apparently triggered by Alexanders
recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
but it seems to work quite well :-)
* gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
prototype
Sat Mar 10 12:15:31 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.

View File

@ -1,3 +1,23 @@
2001-03-10 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated
* gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
to offseting the clip_mask at the right place
* gdk/win32/gdkwindow-win32.c : don't create background brushes
for all the gdkClasses, especially not for the input_only case.
Otherwise flickering wont be avoidable, because we don't get
WM_ERASEBKGND message for these windows.
* gdk/win32/gdkevents-win32.c : initialize event->expose.region
and fixed massive redraw problems apparently triggered by Alexanders
recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
but it seems to work quite well :-)
* gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
prototype
Sat Mar 10 12:15:31 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.

View File

@ -1,3 +1,23 @@
2001-03-10 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated
* gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
to offseting the clip_mask at the right place
* gdk/win32/gdkwindow-win32.c : don't create background brushes
for all the gdkClasses, especially not for the input_only case.
Otherwise flickering wont be avoidable, because we don't get
WM_ERASEBKGND message for these windows.
* gdk/win32/gdkevents-win32.c : initialize event->expose.region
and fixed massive redraw problems apparently triggered by Alexanders
recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
but it seems to work quite well :-)
* gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
prototype
Sat Mar 10 12:15:31 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.

View File

@ -1,3 +1,23 @@
2001-03-10 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated
* gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
to offseting the clip_mask at the right place
* gdk/win32/gdkwindow-win32.c : don't create background brushes
for all the gdkClasses, especially not for the input_only case.
Otherwise flickering wont be avoidable, because we don't get
WM_ERASEBKGND message for these windows.
* gdk/win32/gdkevents-win32.c : initialize event->expose.region
and fixed massive redraw problems apparently triggered by Alexanders
recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
but it seems to work quite well :-)
* gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
prototype
Sat Mar 10 12:15:31 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.

View File

@ -1,3 +1,23 @@
2001-03-10 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated
* gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
to offseting the clip_mask at the right place
* gdk/win32/gdkwindow-win32.c : don't create background brushes
for all the gdkClasses, especially not for the input_only case.
Otherwise flickering wont be avoidable, because we don't get
WM_ERASEBKGND message for these windows.
* gdk/win32/gdkevents-win32.c : initialize event->expose.region
and fixed massive redraw problems apparently triggered by Alexanders
recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
but it seems to work quite well :-)
* gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
prototype
Sat Mar 10 12:15:31 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.

View File

@ -1,3 +1,23 @@
2001-03-10 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated
* gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
to offseting the clip_mask at the right place
* gdk/win32/gdkwindow-win32.c : don't create background brushes
for all the gdkClasses, especially not for the input_only case.
Otherwise flickering wont be avoidable, because we don't get
WM_ERASEBKGND message for these windows.
* gdk/win32/gdkevents-win32.c : initialize event->expose.region
and fixed massive redraw problems apparently triggered by Alexanders
recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
but it seems to work quite well :-)
* gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
prototype
Sat Mar 10 12:15:31 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.

View File

@ -1,3 +1,23 @@
2001-03-10 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated
* gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
to offseting the clip_mask at the right place
* gdk/win32/gdkwindow-win32.c : don't create background brushes
for all the gdkClasses, especially not for the input_only case.
Otherwise flickering wont be avoidable, because we don't get
WM_ERASEBKGND message for these windows.
* gdk/win32/gdkevents-win32.c : initialize event->expose.region
and fixed massive redraw problems apparently triggered by Alexanders
recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
but it seems to work quite well :-)
* gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
prototype
Sat Mar 10 12:15:31 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.

View File

@ -159,21 +159,6 @@ EXPORTS
gdk_get_display
gdk_get_show_events
gdk_get_use_xshm
gdk_ic_attr_destroy
gdk_ic_attr_new
gdk_ic_destroy
gdk_ic_get_attr
gdk_ic_get_events
gdk_ic_get_style
gdk_ic_get_values
gdk_ic_new
gdk_ic_set_attr
gdk_ic_set_values
gdk_im_begin
gdk_im_decide_style
gdk_im_end
gdk_im_ready
gdk_im_set_best_style
gdk_image_get
gdk_image_get_pixel
gdk_image_get_type
@ -320,6 +305,7 @@ EXPORTS
gdk_window_add_filter
gdk_window_at_pointer
gdk_window_begin_paint_rect
gdk_window_begin_paint_region
gdk_window_clear
gdk_window_clear_area
gdk_window_clear_area_e

View File

@ -96,7 +96,8 @@ static GdkFilterReturn
static gboolean gdk_event_translate (GdkEvent *event,
MSG *msg,
gboolean *ret_val_flagp,
gint *ret_valp);
gint *ret_valp,
gboolean return_exposes);
static gboolean gdk_event_prepare (GSource *source,
gint *timeout);
@ -172,7 +173,7 @@ real_window_procedure (HWND hwnd,
msg.pt.y = HIWORD (pos);
event.flags = GDK_EVENT_PENDING;
if (gdk_event_translate (&event.event, &msg, &ret_val_flag, &ret_val))
if (gdk_event_translate (&event.event, &msg, &ret_val_flag, &ret_val, FALSE))
{
event.flags &= ~GDK_EVENT_PENDING;
#if 1
@ -417,7 +418,7 @@ gdk_event_get_graphics_expose (GdkWindow *window)
{
event = gdk_event_new ();
if (gdk_event_translate (event, &msg, NULL, NULL))
if (gdk_event_translate (event, &msg, NULL, NULL, TRUE))
return event;
else
gdk_event_free (event);
@ -1596,7 +1597,8 @@ static gboolean
gdk_event_translate (GdkEvent *event,
MSG *msg,
gboolean *ret_val_flagp,
gint *ret_valp)
gint *ret_valp,
gboolean return_exposes)
{
DWORD pidActWin;
DWORD pidThis;
@ -2764,28 +2766,45 @@ gdk_event_translate (GdkEvent *event,
|| (paintstruct.rcPaint.bottom == paintstruct.rcPaint.top))
break;
event->expose.type = GDK_EXPOSE;
event->expose.window = window;
event->expose.area.x = paintstruct.rcPaint.left;
event->expose.area.y = paintstruct.rcPaint.top;
event->expose.area.width = paintstruct.rcPaint.right - paintstruct.rcPaint.left;
event->expose.area.height = paintstruct.rcPaint.bottom - paintstruct.rcPaint.top;
event->expose.count = 0;
if (return_exposes)
{
event->expose.type = GDK_EXPOSE;
event->expose.window = window;
event->expose.area.x = paintstruct.rcPaint.left;
event->expose.area.y = paintstruct.rcPaint.top;
event->expose.area.width = paintstruct.rcPaint.right - paintstruct.rcPaint.left;
event->expose.area.height = paintstruct.rcPaint.bottom - paintstruct.rcPaint.top;
event->expose.region = gdk_region_rectangle (&(event->expose.area));
event->expose.count = 0;
return_val = !GDK_WINDOW_DESTROYED (window);
if (return_val)
{
GList *list = gdk_queued_events;
while (list != NULL )
{
if ((((GdkEvent *)list->data)->any.type == GDK_EXPOSE) &&
(((GdkEvent *)list->data)->any.window == window) &&
!(((GdkEventPrivate *)list->data)->flags & GDK_EVENT_PENDING))
((GdkEvent *)list->data)->expose.count++;
list = list->next;
}
}
return_val = !GDK_WINDOW_DESTROYED (window);
if (return_val)
{
GList *list = gdk_queued_events;
while (list != NULL )
{
if ((((GdkEvent *)list->data)->any.type == GDK_EXPOSE) &&
(((GdkEvent *)list->data)->any.window == window) &&
!(((GdkEventPrivate *)list->data)->flags & GDK_EVENT_PENDING))
((GdkEvent *)list->data)->expose.count++;
list = list->next;
}
}
}
else
{
GdkRectangle expose_rect;
expose_rect.x = paintstruct.rcPaint.left;
expose_rect.y = paintstruct.rcPaint.top;
expose_rect.width = paintstruct.rcPaint.right - paintstruct.rcPaint.left;
expose_rect.height = paintstruct.rcPaint.bottom - paintstruct.rcPaint.top;
_gdk_window_process_expose (window, GetMessageTime (), &expose_rect);
return_val = FALSE;
}
break;
case WM_SETCURSOR:

View File

@ -338,9 +338,6 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
win32_gc->hcliprgn =
BitmapToRegion ((HBITMAP) GDK_PIXMAP_HBITMAP (values->clip_mask));
win32_gc->values_mask |= GDK_GC_CLIP_MASK;
OffsetRgn (win32_gc->hcliprgn,
win32_gc->parent_instance.clip_x_origin,
win32_gc->parent_instance.clip_y_origin);
}
else
{
@ -385,8 +382,8 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
win32_gc->values_mask |= GDK_GC_CLIP_Y_ORIGIN;
GDK_NOTE (MISC, (g_print ("%sclip_y=%d", s, values->clip_y_origin),
s = ","));
}
}
if (mask & GDK_GC_EXPOSURES)
{
win32_gc->graphics_exposures = values->graphics_exposures;
@ -1082,6 +1079,10 @@ gdk_win32_hdc_get (GdkDrawable *drawable,
{
if (SelectClipRgn (win32_gc->hdc, win32_gc->hcliprgn) == ERROR)
WIN32_API_FAILED ("SelectClipRgn"), ok = FALSE;
if (ok && !OffsetClipRgn (win32_gc->hdc,
win32_gc->values_mask & GDK_GC_CLIP_X_ORIGIN ? gc->clip_x_origin : 0,
win32_gc->values_mask & GDK_GC_CLIP_Y_ORIGIN ? gc->clip_y_origin : 0))
WIN32_API_FAILED ("OffsetClipRgn"), ok = FALSE;
}
if (gdk_debug_flags & GDK_DEBUG_MISC)

View File

@ -39,6 +39,9 @@ _gdk_window_move_resize_child (GdkWindow *window,
gint y,
gint width,
gint height);
void _gdk_window_process_expose (GdkWindow *window,
gulong serial,
GdkRectangle *area);
void gdk_win32_selection_init (void);
void gdk_win32_dnd_exit (void);

View File

@ -329,10 +329,15 @@ RegisterGdkClass (GdkWindowType wtype)
wcl.hIconSm = 0;
/* initialize once per class */
/*
* HB: Setting the background brush leads to flicker, because we
* don't get asked how to clear the background. This is not what
* we want, at least not for input_only windows ...
*/
#define ONCE_PER_CLASS() \
wcl.hIcon = CopyIcon (hAppIcon); \
wcl.hIconSm = CopyIcon (hAppIcon); \
wcl.hbrBackground = CreateSolidBrush (RGB (0,0,0)); \
wcl.hbrBackground = NULL; /* CreateSolidBrush (RGB (0,0,0)); */ \
wcl.hCursor = LoadCursor (NULL, IDC_ARROW);
switch (wtype)