Add support for input method candidate windows

Bug #1426443 reported by William Hua
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
New
Undecided
Unassigned
mir (Ubuntu)
New
Undecided
Unassigned
qtmir (Ubuntu)
Confirmed
Undecided
Daniel d'Andrada

Bug Description

I'm porting fcitx-qimpanel to Qt 5, which provides the widget for displaying a list of candidates for CJK input. But the Qt 5 QPA doesn't currently support the following features that it needs:

- QQuickWidget
- setting window masks
- propagateSizeHints()

and other features yet-to-be-determined.

=== excerpt of stdout from running fcitx-qimpanel under Mir ===

QSocketNotifier: Can only be used with threads started with QThread
QSocketNotifier: Can only be used with threads started with QThread
QSocketNotifier: Can only be used with threads started with QThread
QSocketNotifier: Can only be used with threads started with QThread
QSocketNotifier: Can only be used with threads started with QThread
QObject::startTimer: Timers can only be used with threads started with QThread
QObject::startTimer: Timers can only be used with threads started with QThread
reply.value(): ":1.8"
reply.value(): ":1.8"
fcitxIsNotRunning(): 0
mIsHorizontal: true
mSkinName: "ubuntukylin-dark1"
MainController::init()
QQuickWidget is not supported on this platform.
/usr/share/fcitx-qimpanel/skin
SkinType is default
QSystemTrayIcon::setVisible: No Icon set
UbuntuWindow - regular geometry
UbuntuWindow - regular geometry
UbuntuWindow - regular geometry
This plugin does not support setting window masks
This plugin does not support propagateSizeHints()
This plugin does not support propagateSizeHints()

QUbuntuWindow::moveResize (this=0x2776bd0, x=0, y=0, w=164, h=32)
UbuntuWindow::moveResize(width=164, height=32)
This plugin does not support setting window masks

QUbuntuWindow::moveResize (this=0x2776bd0, x=28, y=200, w=164, h=32)
UbuntuWindow::moveResize(width=164, height=32)
UbuntuWindow - regular geometry

Revision history for this message
Gerry Boland (gerboland) wrote :

Hi William,
it is my understanding that support for input methods in Mir currently needs a lot of work. The Mir team needs to identify what functionality that libXimd (the IMdkit library used by fcitx and others) to implement and how.

Here would be my initial guess at the high-level requirements for Mir/QtMir:
1. positioning the IM surface relative to the keyboard caret, while being aware of screen borders (i.e. does not go off screen)
2. surface resizes & repositions itself at will
3. concept of "preedit" needed, where as user is constructing a word, the application draws the text underlined, but doesn't consider it committed
4. input event forwarding (from IM to client)
5. notifications of client behaviour - focus in/out, client open/close, surface move/resize....

But I'd need an expert on IM technologies to make this list more precise.

Gerry Boland (gerboland)
summary: - Add QPA support for input method candidate windows
+ Add support for input method candidate windows
Gerry Boland (gerboland)
Changed in qtmir (Ubuntu):
status: New → Confirmed
Changed in qtmir:
status: New → Confirmed
Revision history for this message
Daniel d'Andrada (dandrader) wrote :
Changed in qtmir (Ubuntu):
assignee: nobody → Daniel d'Andrada (dandrader)
Changed in qtmir:
assignee: nobody → Daniel d'Andrada (dandrader)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Also needs support for these window flags:
- Qt::Tool
- Qt::WindowStaysOnTopHint
- Qt::WindowDoesNotAcceptFocus
- Qt::FramelessWindowHint

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Also needs QDesktopWidget support.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

fcitx framework needs QWindow to know its position on the screen.

ie: things like QPlatformWindow::mapToGlobal and QPlatformWindow::mapFromGlobal must work.

fcitx-qimpanel needs to be able to set the position of its top-level QWindow on the screen.

Denying such things (as per mir design) obsoletes a sizable chunk of the ui part of fcitx framework. It ensures a rewrite/refactoring of most of fcitx-qimpanel code.

Revision history for this message
Will Cooke (willcooke) wrote : Automatically added comment
tags: added: desktop-trello-import
tags: removed: desktop-trello-import
Michał Sawicz (saviq)
no longer affects: qtmir
Revision history for this message
Michał Sawicz (saviq) wrote :

Syncing task from Mir.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.