summaryrefslogtreecommitdiffstats
path: root/abs/core/qt5/ibus-get-display-number-when-screen-number-is-omitted.patch
blob: 54897e070d518ce4646c0af5278da1f57fc90bb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From c72325d52575cb8a46cc8595c592c27581089dec Mon Sep 17 00:00:00 2001
From: Takao Fujiwara <tfujiwar@redhat.com>
Date: Tue, 24 Mar 2015 19:08:34 +0900
Subject: [PATCH] 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>
---
 .../ibus/qibusplatforminputcontext.cpp             |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
index d00435b..673942b 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
@@ -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;
 
-- 
1.7.1