aboutsummaryrefslogtreecommitdiff
path: root/src/Xutil.cc
diff options
context:
space:
mode:
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;