aboutsummaryrefslogtreecommitdiff
path: root/src/Xutil.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-08 18:17:21 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-08 18:17:21 (GMT)
commit690d926ac444243611cd875fb84fabb4e6db2cf2 (patch)
treec8ef84056b295071f9a9207ffea5393c6cf4ad4d /src/Xutil.cc
parent1e8fe2bc14856fa16508686a28a85e72cb0e422c (diff)
downloadfluxbox_pavel-690d926ac444243611cd875fb84fabb4e6db2cf2.zip
fluxbox_pavel-690d926ac444243611cd875fb84fabb4e6db2cf2.tar.bz2
introduced FbTk::BidiString
a 'BidiString' holds both the logical content and the visual reordered version of the content of a string. this helps to reduce the number of calls to reorder the string before drawing it (as introduced in the patch from Ken Bloom) and to be more consistent in menus and textboxes (drawing cursors and underlining text).
Diffstat (limited to 'src/Xutil.cc')
-rw-r--r--src/Xutil.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Xutil.cc b/src/Xutil.cc
index dfaccf9..2ef9315 100644
--- a/src/Xutil.cc
+++ b/src/Xutil.cc
@@ -46,7 +46,7 @@ namespace Xutil {
46FbTk::FbString getWMName(Window window) { 46FbTk::FbString getWMName(Window window) {
47 47
48 if (window == None) 48 if (window == None)
49 return ""; 49 return FbTk::FbString("");
50 50
51 Display *display = FbTk::App::instance()->display(); 51 Display *display = FbTk::App::instance()->display();
52 52
@@ -55,7 +55,7 @@ FbTk::FbString getWMName(Window window) {
55 char **list = 0; 55 char **list = 0;
56 int num = 0; 56 int num = 0;
57 _FB_USES_NLS; 57 _FB_USES_NLS;
58 string name; 58 FbTk::FbString name;
59 59
60 if (XGetWMName(display, window, &text_prop)) { 60 if (XGetWMName(display, window, &text_prop)) {
61 if (text_prop.value && text_prop.nitems > 0) { 61 if (text_prop.value && text_prop.nitems > 0) {
@@ -90,9 +90,10 @@ FbTk::FbString getWMName(Window window) {
90 90
91 91
92// The name of this particular instance 92// The name of this particular instance
93string getWMClassName(Window win) { 93FbTk::FbString getWMClassName(Window win) {
94
94 XClassHint ch; 95 XClassHint ch;
95 string instance_name; 96 FbTk::FbString instance_name;
96 97
97 if (XGetClassHint(FbTk::App::instance()->display(), win, &ch) == 0) { 98 if (XGetClassHint(FbTk::App::instance()->display(), win, &ch) == 0) {
98 fbdbg<<"Xutil: Failed to read class hint!"<<endl; 99 fbdbg<<"Xutil: Failed to read class hint!"<<endl;
@@ -111,13 +112,13 @@ string getWMClassName(Window win) {
111 } 112 }
112 113
113 return instance_name; 114 return instance_name;
114
115} 115}
116 116
117// the name of the general class of the app 117// the name of the general class of the app
118string getWMClassClass(Window win) { 118FbTk::FbString getWMClassClass(Window win) {
119
119 XClassHint ch; 120 XClassHint ch;
120 string class_name; 121 FbTk::FbString class_name;
121 122
122 if (XGetClassHint(FbTk::App::instance()->display(), win, &ch) == 0) { 123 if (XGetClassHint(FbTk::App::instance()->display(), win, &ch) == 0) {
123 fbdbg<<"Xutil: Failed to read class hint!"<<endl; 124 fbdbg<<"Xutil: Failed to read class hint!"<<endl;