Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1517 by [email protected]: ibus does NOT work with openbox
http://code.google.com/p/ibus/issues/detail?id=1517

Please *DO NOT* ask question here! Please use
https://groups.google.com/group/ibus-user

请不要在这里提问,请使用ibus用户讨论组
https://groups.google.com/group/ibus-user

What version of the product are you using? On what operating system?
OS (Linux distributions, UNIX or ...): Linux, Funtoo.org
Architecture (i386, x86_64): x86_64
IBus version: 1.4.1/1.4.2
Input method name and version: ibus-pinyin/ibus-anthy
Python version: 2.7.3
dbus version: 1.6.4
dbus-python version:
gtk version (if bug is about gtk applications): gtk+-2.24.13
qt version (if bug is about qt applications):

What steps will reproduce the problem?
1. start ibus-daemon with 'ibus-daemon -x -d'
2. click in an gtk application where the user could input contents

What is the expected output? What do you see instead?

EXPECTED BEHAVIOR:
- IM window could show up. Character selection window could be displayed near to mouse.

ACTUARIAL BEHAVIOR:
- IM winow could not be rendered. So as the character selection window.
- "No input window" message displayed when click the ibus tray icon.

I am using ibus with openbox-session.

Please provide any additional information below.

The occurrence of the error is there in ui/gtk/panel.py, looks like

class Panel(ibus.PanelBase):
      __gtype_name__ = "IBusPanel"
    def __init__(self, bus):
        super(Panel, self).__init__(bus)
        self.__bus = bus
...
        def focus_in(self, ic):
        self.reset()
        self.__focus_ic = ibus.InputContext(self.__bus, ic)
...
    def __status_icon_activate_cb(self, status_icon):
        if not self.__focus_ic:
            menu = gtk.Menu()
            item = gtk.ImageMenuItem(_("No input window"))
            size = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)
            item.set_image(_icon.IconWidget("gtk-dialog-info", size[0]))
            menu.add(item)
            menu.show_all()
        else:
            menu = self.__create_im_menu()
            self.__language_bar.create_im_menu(menu)
        menu.popup(None, None,
                gtk.status_icon_position_menu,
                0,
                gtk.get_current_event_time(),
                self.__status_icon)
...

The reason why the 'No input window' should be caused by no __focus_ic fetched properly. It seems InputContext is not initialized. Since I am using openbox-session instead of Gnome/KDE, this is susceptible. Some sub code for python in X might be with something wrong.

--
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

回复