Win32: Philippe Colantoni <colanton@aris.ss.uci.edu> suggests a way to get

1999-08-27  Tor Lillqvist  <tml@iki.fi>

Win32: Philippe Colantoni <colanton@aris.ss.uci.edu> suggests a
way to get window contents continually refreshed while resizing. I
didn't like the effects myself, so it's not on by default.

* gdk/win32/gdkprivate.h: New flag variable
gdk_event_func_from_window_proc, FALSE by default.

* gdk/win32/gdk.c (gdk_init_check): Set above flag if the
environment variable GDK_EVENT_FUNC_FROM_WINDOW_PROC is set, or we
are passed --gdk-event-func-from-window-proc.

* gdk/win32/gdkevents.c (gdk_WindowProc): If above flag is set,
and we have am event_func, call it instead of enqueing the event.
This commit is contained in:
Tor Lillqvist 1999-08-26 22:22:03 +00:00 committed by Tor Lillqvist
parent 6ebe59ced3
commit aafd722b21
13 changed files with 178 additions and 6 deletions

View File

@ -1,3 +1,19 @@
1999-08-27 Tor Lillqvist <tml@iki.fi>
Win32: Philippe Colantoni <colanton@aris.ss.uci.edu> suggests a
way to get window contents continually refreshed while resizing. I
didn't like the effects myself, so it's not on by default.
* gdk/win32/gdkprivate.h: New flag variable
gdk_event_func_from_window_proc, FALSE by default.
* gdk/win32/gdk.c (gdk_init_check): Set above flag if the
environment variable GDK_EVENT_FUNC_FROM_WINDOW_PROC is set, or we
are passed --gdk-event-func-from-window-proc.
* gdk/win32/gdkevents.c (gdk_WindowProc): If above flag is set,
and we have am event_func, call it instead of enqueing the event.
1999-08-23 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix from Simon

View File

@ -1,3 +1,19 @@
1999-08-27 Tor Lillqvist <tml@iki.fi>
Win32: Philippe Colantoni <colanton@aris.ss.uci.edu> suggests a
way to get window contents continually refreshed while resizing. I
didn't like the effects myself, so it's not on by default.
* gdk/win32/gdkprivate.h: New flag variable
gdk_event_func_from_window_proc, FALSE by default.
* gdk/win32/gdk.c (gdk_init_check): Set above flag if the
environment variable GDK_EVENT_FUNC_FROM_WINDOW_PROC is set, or we
are passed --gdk-event-func-from-window-proc.
* gdk/win32/gdkevents.c (gdk_WindowProc): If above flag is set,
and we have am event_func, call it instead of enqueing the event.
1999-08-23 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix from Simon

View File

@ -1,3 +1,19 @@
1999-08-27 Tor Lillqvist <tml@iki.fi>
Win32: Philippe Colantoni <colanton@aris.ss.uci.edu> suggests a
way to get window contents continually refreshed while resizing. I
didn't like the effects myself, so it's not on by default.
* gdk/win32/gdkprivate.h: New flag variable
gdk_event_func_from_window_proc, FALSE by default.
* gdk/win32/gdk.c (gdk_init_check): Set above flag if the
environment variable GDK_EVENT_FUNC_FROM_WINDOW_PROC is set, or we
are passed --gdk-event-func-from-window-proc.
* gdk/win32/gdkevents.c (gdk_WindowProc): If above flag is set,
and we have am event_func, call it instead of enqueing the event.
1999-08-23 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix from Simon

View File

@ -1,3 +1,19 @@
1999-08-27 Tor Lillqvist <tml@iki.fi>
Win32: Philippe Colantoni <colanton@aris.ss.uci.edu> suggests a
way to get window contents continually refreshed while resizing. I
didn't like the effects myself, so it's not on by default.
* gdk/win32/gdkprivate.h: New flag variable
gdk_event_func_from_window_proc, FALSE by default.
* gdk/win32/gdk.c (gdk_init_check): Set above flag if the
environment variable GDK_EVENT_FUNC_FROM_WINDOW_PROC is set, or we
are passed --gdk-event-func-from-window-proc.
* gdk/win32/gdkevents.c (gdk_WindowProc): If above flag is set,
and we have am event_func, call it instead of enqueing the event.
1999-08-23 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix from Simon

View File

@ -1,3 +1,19 @@
1999-08-27 Tor Lillqvist <tml@iki.fi>
Win32: Philippe Colantoni <colanton@aris.ss.uci.edu> suggests a
way to get window contents continually refreshed while resizing. I
didn't like the effects myself, so it's not on by default.
* gdk/win32/gdkprivate.h: New flag variable
gdk_event_func_from_window_proc, FALSE by default.
* gdk/win32/gdk.c (gdk_init_check): Set above flag if the
environment variable GDK_EVENT_FUNC_FROM_WINDOW_PROC is set, or we
are passed --gdk-event-func-from-window-proc.
* gdk/win32/gdkevents.c (gdk_WindowProc): If above flag is set,
and we have am event_func, call it instead of enqueing the event.
1999-08-23 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix from Simon

View File

@ -1,3 +1,19 @@
1999-08-27 Tor Lillqvist <tml@iki.fi>
Win32: Philippe Colantoni <colanton@aris.ss.uci.edu> suggests a
way to get window contents continually refreshed while resizing. I
didn't like the effects myself, so it's not on by default.
* gdk/win32/gdkprivate.h: New flag variable
gdk_event_func_from_window_proc, FALSE by default.
* gdk/win32/gdk.c (gdk_init_check): Set above flag if the
environment variable GDK_EVENT_FUNC_FROM_WINDOW_PROC is set, or we
are passed --gdk-event-func-from-window-proc.
* gdk/win32/gdkevents.c (gdk_WindowProc): If above flag is set,
and we have am event_func, call it instead of enqueing the event.
1999-08-23 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix from Simon

View File

@ -1,3 +1,19 @@
1999-08-27 Tor Lillqvist <tml@iki.fi>
Win32: Philippe Colantoni <colanton@aris.ss.uci.edu> suggests a
way to get window contents continually refreshed while resizing. I
didn't like the effects myself, so it's not on by default.
* gdk/win32/gdkprivate.h: New flag variable
gdk_event_func_from_window_proc, FALSE by default.
* gdk/win32/gdk.c (gdk_init_check): Set above flag if the
environment variable GDK_EVENT_FUNC_FROM_WINDOW_PROC is set, or we
are passed --gdk-event-func-from-window-proc.
* gdk/win32/gdkevents.c (gdk_WindowProc): If above flag is set,
and we have am event_func, call it instead of enqueing the event.
1999-08-23 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix from Simon

View File

@ -136,6 +136,9 @@ gdk_init_check (int *argc,
if (getenv ("GDK_IGNORE_WINTAB") != NULL)
gdk_input_ignore_wintab = TRUE;
if (getenv ("GDK_EVENT_FUNC_FROM_WINDOW_PROC") != NULL)
gdk_event_func_from_window_proc = TRUE;
if (argc && argv)
{
if (*argc > 0)
@ -216,6 +219,11 @@ gdk_init_check (int *argc,
(*argv)[i] = NULL;
gdk_input_ignore_wintab = TRUE;
}
else if (strcmp ("--gdk-event-func-from-window-proc", (*argv)[i]) == 0)
{
(*argv)[i] = NULL;
gdk_event_func_from_window_proc = TRUE;
}
i += 1;
}

View File

@ -47,6 +47,8 @@ typedef struct _GdkEventPrivate GdkEventPrivate;
#define DOUBLE_CLICK_DIST 5
#define TRIPLE_CLICK_DIST 5
gint gdk_event_func_from_window_proc = FALSE;
typedef enum
{
/* Following flag is set for events on the event queue during
@ -201,11 +203,30 @@ gdk_WindowProc(HWND hwnd,
eventp = gdk_event_new ();
*eventp = event;
gdk_event_queue_append (eventp);
/* Philippe Colantoni <colanton@aris.ss.uci.edu> suggests this
* in order to handle events while opaque resizing neatly. I
* don't want it as default. Set the
* GDK_EVENT_FUNC_FROM_WINDOW_PROC env var to get this
* behaviour.
*/
if (gdk_event_func_from_window_proc && event_func)
{
GDK_THREADS_ENTER ();
(*event_func) (eventp, event_data);
gdk_event_free (eventp);
GDK_THREADS_LEAVE ();
}
else
{
gdk_event_queue_append (eventp);
#if 1
/* Wake up WaitMessage */
PostMessage (NULL, gdk_ping_msg, 0, 0);
/* Wake up WaitMessage */
PostMessage (NULL, gdk_ping_msg, 0, 0);
#endif
}
if (ret_val_flag)
return ret_val;
else

View File

@ -47,6 +47,8 @@ typedef struct _GdkEventPrivate GdkEventPrivate;
#define DOUBLE_CLICK_DIST 5
#define TRIPLE_CLICK_DIST 5
gint gdk_event_func_from_window_proc = FALSE;
typedef enum
{
/* Following flag is set for events on the event queue during
@ -201,11 +203,30 @@ gdk_WindowProc(HWND hwnd,
eventp = gdk_event_new ();
*eventp = event;
gdk_event_queue_append (eventp);
/* Philippe Colantoni <colanton@aris.ss.uci.edu> suggests this
* in order to handle events while opaque resizing neatly. I
* don't want it as default. Set the
* GDK_EVENT_FUNC_FROM_WINDOW_PROC env var to get this
* behaviour.
*/
if (gdk_event_func_from_window_proc && event_func)
{
GDK_THREADS_ENTER ();
(*event_func) (eventp, event_data);
gdk_event_free (eventp);
GDK_THREADS_LEAVE ();
}
else
{
gdk_event_queue_append (eventp);
#if 1
/* Wake up WaitMessage */
PostMessage (NULL, gdk_ping_msg, 0, 0);
/* Wake up WaitMessage */
PostMessage (NULL, gdk_ping_msg, 0, 0);
#endif
}
if (ret_val_flag)
return ret_val;
else

View File

@ -136,6 +136,9 @@ gdk_init_check (int *argc,
if (getenv ("GDK_IGNORE_WINTAB") != NULL)
gdk_input_ignore_wintab = TRUE;
if (getenv ("GDK_EVENT_FUNC_FROM_WINDOW_PROC") != NULL)
gdk_event_func_from_window_proc = TRUE;
if (argc && argv)
{
if (*argc > 0)
@ -216,6 +219,11 @@ gdk_init_check (int *argc,
(*argv)[i] = NULL;
gdk_input_ignore_wintab = TRUE;
}
else if (strcmp ("--gdk-event-func-from-window-proc", (*argv)[i]) == 0)
{
(*argv)[i] = NULL;
gdk_event_func_from_window_proc = TRUE;
}
i += 1;
}

View File

@ -388,6 +388,7 @@ GDKVAR gint gdk_error_code;
GDKVAR gint gdk_error_warnings;
GDKVAR gint gdk_null_window_warnings;
extern GList *gdk_default_filters;
extern gint gdk_event_func_from_window_proc;
#ifdef USE_XIM
/* XIM support */

View File

@ -388,6 +388,7 @@ GDKVAR gint gdk_error_code;
GDKVAR gint gdk_error_warnings;
GDKVAR gint gdk_null_window_warnings;
extern GList *gdk_default_filters;
extern gint gdk_event_func_from_window_proc;
#ifdef USE_XIM
/* XIM support */