From 4be19e3fdce0a64287205f96f1c8c7be1d9b61b0 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 21 Feb 2011 17:22:42 +0000 Subject: 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 --- src/ui/windowsystem.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/ui/windowsystem.cpp') 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(); -- cgit v1.2.3-13-gbd6f