ibus: Get display number when screen number is omitted.

QIBusPlatformInputContextPrivate::createConnection() parses DISPLAY
variable and it does not get the display number when the screen number
is omitted. E.g. DISPLAY=":1".

Change-Id: I9f81d8114d4e0f654a27ada67c5dc110eb34cd64
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Takao Fujiwara 2015-03-24 19:08:34 +09:00 committed by Gatis Paeglis
parent fa3985ab22
commit c72325d525
1 changed files with 2 additions and 0 deletions

View File

@ -351,6 +351,8 @@ QDBusConnection *QIBusPlatformInputContextPrivate::createConnection()
int pos2 = display.indexOf('.', pos);
if (pos2 > 0)
displayNumber = display.mid(pos, pos2 - pos);
else
displayNumber = display.right(pos);
if (debug)
qDebug() << "host=" << host << "displayNumber" << displayNumber;