aboutsummaryrefslogtreecommitdiff
path: root/src/ui/windowsystem.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2011-02-21 17:22:42 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2011-02-21 17:22:42 +0000
commit4be19e3fdce0a64287205f96f1c8c7be1d9b61b0 (patch)
treeaa03ed504e65ad03b62abf14a4be8cf6cb62784c /src/ui/windowsystem.cpp
parent5b10a56f8568935ac80d9a6c72289ceab2512975 (diff)
downloadqmmp-4be19e3fdce0a64287205f96f1c8c7be1d9b61b0.tar.gz
qmmp-4be19e3fdce0a64287205f96f1c8c7be1d9b61b0.tar.bz2
qmmp-4be19e3fdce0a64287205f96f1c8c7be1d9b61b0.zip
fixed WM_CLASS/WM_ROLE properties (Closes issue 414)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2066 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/ui/windowsystem.cpp')
-rw-r--r--src/ui/windowsystem.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/windowsystem.cpp b/src/ui/windowsystem.cpp
index 72746434d..4b66ae025 100644
--- a/src/ui/windowsystem.cpp
+++ b/src/ui/windowsystem.cpp
@@ -1,6 +1,7 @@
/***************************************************************************
* Based on Licq *
* Copyright (C) 2006-2009 Licq developers *
+ * Copyright (C) 2011 Ilya Kotov *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -135,6 +136,17 @@ void WindowSystem::changeWinSticky(WId win, bool stick)
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
}
+void WindowSystem::setWinHint(WId win, const char *res_name, const char *res_class)
+{
+ Display* dsp = QX11Info::display();
+ XClassHint hint;
+ hint.res_name = strdup(res_name);
+ hint.res_class = strdup(res_class);
+ XSetClassHint(dsp, win, &hint);
+ free(hint.res_name);
+ free(hint.res_class);
+}
+
unsigned char* WindowSystem::getWindowProperty(WId win, const char* prop)
{
Display* dsp = QX11Info::display();