Comment #16 on issue 1444 by takao.fujiwara1: The candidate box would
exceed the screen bottom when I use multiple monitors
http://code.google.com/p/ibus/issues/detail?id=1444
OK, I think there are two tests.
#1. If the coordinates are right.
You can remove the previous debug codes above comment #10 and add the
specific coordinates. E.g.
--- /usr/share/ibus/ui/gtk/languagebar.py.orig
+++ /usr/share/ibus/ui/gtk/languagebar.py
@@ -136,6 +136,7 @@ class LanguageBar(gtk.Toolbar):
def __toplevel_size_allocate_cb(self, toplevel, allocation):
x, y = self.__position
w, h = self.__screen.get_width(), self.__screen.get_height()
+ print 'test size_allocate_cb', x, y, w, h, allocation
if x >= w - 80 or True:
self.__toplevel.move(x - allocation.width, y - allocation.height)
@@ -258,6 +258,6 @@ class LanguageBar(gtk.Toolbar):
self.__position = x, y
w, h = self.__toplevel.get_size()
- self.__toplevel.move(self.__position[0] - w, self.__position[1] - h)
+ print 'test set_position', x, y, w, h
+ self.__toplevel.move(200, 200)
And run ibus panel by manual again and check if the debug codes are printed
and the specified coordinates (200, 200) effect your problem.
% ps -ef | grep ibus
7300 /usr/bin/python /usr/share/ibus/ui/gtk/main.py
% kill 7300
% ps -ef | grep ibus
% env IBUS_PREFIX=/usr python /usr/share/ibus/ui/gtk/main.py
If the coordinate does not effect your problem, I think your languagebar is
not shown and the next test.
#2. If the languagebar is shown.
Remove the previous debug codes and add the following debug values:
--- /usr/.../ui/gtk/languagebar.py.orig
+++ /usr/.../ui/gtk/languagebar.py
@@ -136,6 +136,7 @@ class LanguageBar(gtk.Toolbar):
def __toplevel_size_allocate_cb(self, toplevel, allocation):
x, y = self.__position
w, h = self.__screen.get_width(), self.__screen.get_height()
+ print 'test size_allocate_cb', x, y, w, h, allocation
if x >= w - 80 or True:
self.__toplevel.move(x - allocation.width, y - allocation.height)
@@ -219,16 +220,21 @@ class LanguageBar(gtk.Toolbar):
def set_enabled(self, enabled):
self.__enabled = enabled
+ print 'test set_enabled', self.__enabled
+ print 'test has_focus', self.__has_focus
+ print 'test show', self.__show
if self.__enabled:
self.__about_button.show()
self.__set_opacity(1.0)
if self.__has_focus:
if self.__show in (1, 2):
+ print 'test show_all'
self.show_all()
else:
self.__about_button.hide()
self.__set_opacity(0.5)
if self.__show in (1, 0):
+ print 'test hide_all'
self.hide_all()
def is_enabled(self):
@@ -238,6 +244,7 @@ class LanguageBar(gtk.Toolbar):
if show not in (0, 1, 2):
show = 0
self.__show = show
+ print 'test set_show', self.__show, self.__has_focus
if self.__has_focus:
self.focus_in()
else:
@@ -258,6 +265,7 @@ class LanguageBar(gtk.Toolbar):
self.__position = x, y
w, h = self.__toplevel.get_size()
+ print 'test set_position', x, y, w, h
self.__toplevel.move(self.__position[0] - w, self.__position[1] - h)
def get_show(self):
@@ -327,6 +335,7 @@ class LanguageBar(gtk.Toolbar):
def focus_in(self):
self.__has_focus = True
self.__im_menu.set_sensitive(True)
+ print 'test focus_in', self.__enabled
if (self.__show == 1 and self.__enabled) or self.__show == 2:
self.show_all()
else:
The change adds the debug codes in __toplevel_size_allocate_cb(),
set_enabled(), set_show(), set_position() and focus_in() in languagebar.py
And I'd like to know the output result when you run the ibus panel by
manual.
--
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en