From 79439c9c7bb1c058cb526972a28b32f0dd06c163 Mon Sep 17 00:00:00 2001 From: Eric Warmenhoven Date: Tue, 16 Sep 2003 17:59:20 +0000 Subject: [PATCH] Add gdk_window_set_keep_{above,below} stubs to fix compilation Tue Sep 16 10:42:00 2003 Eric Warmenhoven * gdk/linux-fb/gdkwindow-fb.c: Add gdk_window_set_keep_{above,below} stubs to fix compilation * gdk/linux-fb/gdkrender-fb.c: Add gdk_shadow_fb_stop_updates stub for when shadowfb is disabled. Patch from pjm@cctechnol.com (#120847). * gdk/linux-fb/gdkmouse-fb.c: Add GDK_MOUSE_DEVICE environment variable. Patch from Marc Welz (#121347). --- ChangeLog | 11 ++++++++ ChangeLog.pre-2-10 | 11 ++++++++ ChangeLog.pre-2-4 | 11 ++++++++ ChangeLog.pre-2-6 | 11 ++++++++ ChangeLog.pre-2-8 | 11 ++++++++ gdk/linux-fb/gdkmouse-fb.c | 56 +++++++++++++++++++++++++------------ gdk/linux-fb/gdkrender-fb.c | 5 ++++ gdk/linux-fb/gdkwindow-fb.c | 16 +++++++++++ 8 files changed, 114 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4a2079127..7fc7c8a963 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Tue Sep 16 10:42:00 2003 Eric Warmenhoven + + * gdk/linux-fb/gdkwindow-fb.c: Add gdk_window_set_keep_{above,below} + stubs to fix compilation + + * gdk/linux-fb/gdkrender-fb.c: Add gdk_shadow_fb_stop_updates stub for + when shadowfb is disabled. Patch from pjm@cctechnol.com (#120847). + + * gdk/linux-fb/gdkmouse-fb.c: Add GDK_MOUSE_DEVICE environment + variable. Patch from Marc Welz (#121347). + 2003-09-16 Matthias Clasen * gtk/gtkaction.h: Apply egtk-format-protos. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c4a2079127..7fc7c8a963 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +Tue Sep 16 10:42:00 2003 Eric Warmenhoven + + * gdk/linux-fb/gdkwindow-fb.c: Add gdk_window_set_keep_{above,below} + stubs to fix compilation + + * gdk/linux-fb/gdkrender-fb.c: Add gdk_shadow_fb_stop_updates stub for + when shadowfb is disabled. Patch from pjm@cctechnol.com (#120847). + + * gdk/linux-fb/gdkmouse-fb.c: Add GDK_MOUSE_DEVICE environment + variable. Patch from Marc Welz (#121347). + 2003-09-16 Matthias Clasen * gtk/gtkaction.h: Apply egtk-format-protos. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index c4a2079127..7fc7c8a963 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,14 @@ +Tue Sep 16 10:42:00 2003 Eric Warmenhoven + + * gdk/linux-fb/gdkwindow-fb.c: Add gdk_window_set_keep_{above,below} + stubs to fix compilation + + * gdk/linux-fb/gdkrender-fb.c: Add gdk_shadow_fb_stop_updates stub for + when shadowfb is disabled. Patch from pjm@cctechnol.com (#120847). + + * gdk/linux-fb/gdkmouse-fb.c: Add GDK_MOUSE_DEVICE environment + variable. Patch from Marc Welz (#121347). + 2003-09-16 Matthias Clasen * gtk/gtkaction.h: Apply egtk-format-protos. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c4a2079127..7fc7c8a963 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,14 @@ +Tue Sep 16 10:42:00 2003 Eric Warmenhoven + + * gdk/linux-fb/gdkwindow-fb.c: Add gdk_window_set_keep_{above,below} + stubs to fix compilation + + * gdk/linux-fb/gdkrender-fb.c: Add gdk_shadow_fb_stop_updates stub for + when shadowfb is disabled. Patch from pjm@cctechnol.com (#120847). + + * gdk/linux-fb/gdkmouse-fb.c: Add GDK_MOUSE_DEVICE environment + variable. Patch from Marc Welz (#121347). + 2003-09-16 Matthias Clasen * gtk/gtkaction.h: Apply egtk-format-protos. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c4a2079127..7fc7c8a963 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +Tue Sep 16 10:42:00 2003 Eric Warmenhoven + + * gdk/linux-fb/gdkwindow-fb.c: Add gdk_window_set_keep_{above,below} + stubs to fix compilation + + * gdk/linux-fb/gdkrender-fb.c: Add gdk_shadow_fb_stop_updates stub for + when shadowfb is disabled. Patch from pjm@cctechnol.com (#120847). + + * gdk/linux-fb/gdkmouse-fb.c: Add GDK_MOUSE_DEVICE environment + variable. Patch from Marc Welz (#121347). + 2003-09-16 Matthias Clasen * gtk/gtkaction.h: Apply egtk-format-protos. diff --git a/gdk/linux-fb/gdkmouse-fb.c b/gdk/linux-fb/gdkmouse-fb.c index c2e16ebcdf..516c7138f1 100644 --- a/gdk/linux-fb/gdkmouse-fb.c +++ b/gdk/linux-fb/gdkmouse-fb.c @@ -36,6 +36,7 @@ typedef struct _GdkFBMouseDevice GdkFBMouseDevice; struct _GdkFBMouse { gint fd; /* Set by open */ + gchar *file; /* These are written to by parse_packet */ gdouble x, y; @@ -252,7 +253,8 @@ handle_mouse_scroll (GdkFBMouse *mouse, */ struct _GdkFBMouseDevice { - char *name; + gchar *name; + gchar *file; gint packet_size; gboolean (*open)(GdkFBMouse *mouse); void (*close)(GdkFBMouse *mouse); @@ -280,6 +282,7 @@ static gboolean gdk_fb_mouse_fidmour_packet (GdkFBMouse *mouse, static GdkFBMouseDevice mouse_devs[] = { { "ps2", + "/dev/psaux", 3, gdk_fb_mouse_ps2_open, gdk_fb_mouse_ps2_close, @@ -287,6 +290,7 @@ static GdkFBMouseDevice mouse_devs[] = { 0xc0, 0x00 } }, { "imps2", + "/dev/psaux", 4, gdk_fb_mouse_imps2_open, gdk_fb_mouse_ps2_close, @@ -294,6 +298,7 @@ static GdkFBMouseDevice mouse_devs[] = { 0xc0, 0x00 } }, { "ms", + "/dev/mouse", 3, gdk_fb_mouse_ms_open, gdk_fb_mouse_ms_close, @@ -301,6 +306,7 @@ static GdkFBMouseDevice mouse_devs[] = { 0x40, 0x40 } }, { "fidmour", + "/dev/fidmour", 5, gdk_fb_mouse_fidmour_open, gdk_fb_mouse_fidmour_close, @@ -312,8 +318,8 @@ static GdkFBMouseDevice mouse_devs[] = gboolean gdk_fb_mouse_init (gboolean open_dev) { - char *mouse_type; - int i; + gchar *mouse_type, *mouse_file; + gint i; gdk_fb_mouse = g_new0 (GdkFBMouse, 1); gdk_fb_mouse->fd = -1; @@ -336,6 +342,11 @@ gdk_fb_mouse_init (gboolean open_dev) gdk_fb_mouse->dev = &mouse_devs[i]; + mouse_file = getenv ("GDK_MOUSE_FILE"); + if (!mouse_file) + mouse_file = gdk_fb_mouse->dev->file; + gdk_fb_mouse->file = mouse_file; + gdk_fb_mouse->x = gdk_display->fb_width / 2; gdk_fb_mouse->y = gdk_display->fb_height / 2; @@ -476,10 +487,13 @@ gdk_fb_mouse_ps2_open (GdkFBMouse *mouse) guchar buf[7]; int i = 0; - fd = gdk_fb_mouse_dev_open ("/dev/psaux", O_RDWR); + fd = gdk_fb_mouse_dev_open (mouse->file, O_RDWR); if (fd < 0) - return FALSE; - + { + g_print ("Error opening %s: %s\n", mouse->file, strerror (errno)); + return FALSE; + } + /* From xf86_Mouse.c */ buf[i++] = 230; /* 1:1 scaling */ buf[i++] = 244; /* enable mouse */ @@ -487,7 +501,7 @@ gdk_fb_mouse_ps2_open (GdkFBMouse *mouse) buf[i++] = 200; buf[i++] = 232; /* device resolution */ buf[i++] = 1; - + if (!write_all (fd, buf, i)) { close (fd); @@ -511,10 +525,13 @@ gdk_fb_mouse_imps2_open (GdkFBMouse *mouse) guchar buf[7]; int i = 0; - fd = gdk_fb_mouse_dev_open ("/dev/psaux", O_RDWR); + fd = gdk_fb_mouse_dev_open (mouse->file, O_RDWR); if (fd < 0) - return FALSE; - + { + g_print ("Error opening %s: %s\n", mouse->file, strerror (errno)); + return FALSE; + } + i = 0; buf[i++] = 243; /* Sample rate */ buf[i++] = 200; @@ -632,15 +649,15 @@ gdk_fb_mouse_ms_open (GdkFBMouse *mouse) guchar buf[7]; struct termios tty; - fd = gdk_fb_mouse_dev_open ("/dev/mouse", O_RDWR); - if (fd < 0) + fd = gdk_fb_mouse_dev_open (mouse->file, O_RDWR); + if (fd < 0) { - g_print ("Error opening /dev/mouse: %s\n", strerror (errno)); + g_print ("Error opening %s: %s\n", mouse->file, strerror (errno)); return FALSE; } - + while ((i = read (fd, buf, sizeof(buf))) > 0) - g_print ("Got %d bytes of junk from /dev/mouse\n", i); + g_print ("Got %d bytes of junk from %s\n", mouse->file, i); tcgetattr (fd, &tty); tty.c_iflag = IGNBRK | IGNPAR; @@ -741,10 +758,13 @@ gdk_fb_mouse_fidmour_open (GdkFBMouse *mouse) { gint fd; - fd = gdk_fb_mouse_dev_open ("/dev/fidmour", O_RDONLY); + fd = gdk_fb_mouse_dev_open (mouse->file, O_RDONLY); if (fd < 0) - return FALSE; - + { + g_print ("Error opening %s: %s\n", mouse->file, strerror (errno)); + return FALSE; + } + mouse->fd = fd; return TRUE; } diff --git a/gdk/linux-fb/gdkrender-fb.c b/gdk/linux-fb/gdkrender-fb.c index 01b5af4054..e8992a8206 100644 --- a/gdk/linux-fb/gdkrender-fb.c +++ b/gdk/linux-fb/gdkrender-fb.c @@ -1504,6 +1504,11 @@ gdk_shadow_fb_update (gint minx, gint miny, gint maxx, gint maxy) } #else +void +gdk_shadow_fb_stop_updates (void) +{ +} + void gdk_shadow_fb_update (gint minx, gint miny, gint maxx, gint maxy) { diff --git a/gdk/linux-fb/gdkwindow-fb.c b/gdk/linux-fb/gdkwindow-fb.c index 3bcf05929c..06d987ad3e 100644 --- a/gdk/linux-fb/gdkwindow-fb.c +++ b/gdk/linux-fb/gdkwindow-fb.c @@ -2208,6 +2208,22 @@ gdk_window_unfullscreen (GdkWindow *window) /* g_warning ("gdk_window_unfullscreen() not implemented.\n");*/ } +void +gdk_window_set_keep_above (GdkWindow *window, gboolean setting) +{ + g_return_if_fail (GDK_IS_WINDOW (window)); + + g_warning ("gdk_window_set_keep_above() not implemented.\n"); +} + +void +gdk_window_set_keep_below (GdkWindow *window, gboolean setting) +{ + g_return_if_fail (GDK_IS_WINDOW (window)); + + g_warning ("gdk_window_set_keep_below() not implemented.\n"); +} + void gdk_window_focus (GdkWindow *window, guint32 timestamp)