Revision: 6489
Author: ek.kato
Date: Sun Jul 4 19:17:55 2010
Log: * helper/candwin-gtk.c
* gtk/uim-cand-win-gtk.c
- (uim_cand_win_gtk_create_sub_window) : Set limit of y
position.
http://code.google.com/p/uim/source/detail?r=6489
Modified:
/trunk/gtk/uim-cand-win-gtk.c
/trunk/helper/candwin-gtk.c
=======================================
--- /trunk/gtk/uim-cand-win-gtk.c Sun Jul 4 19:02:00 2010
+++ /trunk/gtk/uim-cand-win-gtk.c Sun Jul 4 19:17:55 2010
@@ -932,12 +932,17 @@
sw = gdk_screen_get_width (gdk_screen_get_default ());
sh = gdk_screen_get_height (gdk_screen_get_default ());
- gdk_window_get_geometry(cwin->sub_window.window->window,
+ gdk_window_get_geometry(cwin->sub_window.window->window,
&x2, &y2, &w2, &h2, &d2);
if (x + w + w2 > sw)
x = x - w2;
else
x = x + w;
- gtk_window_move(GTK_WINDOW(cwin->sub_window.window), x, y + rect.y);
-}
+ if ((y + rect.y + h2) > sh)
+ y = sh - h2;
+ else
+ y = y + rect.y;
+
+ gtk_window_move(GTK_WINDOW(cwin->sub_window.window), x, y);
+}
=======================================
--- /trunk/helper/candwin-gtk.c Sun Jul 4 19:02:00 2010
+++ /trunk/helper/candwin-gtk.c Sun Jul 4 19:17:55 2010
@@ -1054,7 +1054,12 @@
else
x = x + w;
- gtk_window_move(GTK_WINDOW(cwin->sub_window.window), x, y + rect.y);
+ if ((y + rect.y + h2) > sh)
+ y = sh - h2;
+ else
+ y = y + rect.y;
+
+ gtk_window_move(GTK_WINDOW(cwin->sub_window.window), x, y);
}
static gboolean