diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-01-19 11:07:19 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-01-19 11:07:19 +0000 |
| commit | 7c3e4b7040cf21a11b259571c676e4fc244367ad (patch) | |
| tree | da4cddb864a9c2e265aa4f6643a30926ca1dbb02 /src/plugins/Ui/skinned/windowsystem.cpp | |
| parent | 3db1cecdf8a374cd3755757349af31eae9bad169 (diff) | |
| download | qmmp-7c3e4b7040cf21a11b259571c676e4fc244367ad.tar.gz qmmp-7c3e4b7040cf21a11b259571c676e4fc244367ad.tar.bz2 qmmp-7c3e4b7040cf21a11b259571c676e4fc244367ad.zip | |
fixed playlist resize on RTL locales
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3174 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Ui/skinned/windowsystem.cpp')
| -rw-r--r-- | src/plugins/Ui/skinned/windowsystem.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/plugins/Ui/skinned/windowsystem.cpp b/src/plugins/Ui/skinned/windowsystem.cpp index 75a95eca9..4738f6f5f 100644 --- a/src/plugins/Ui/skinned/windowsystem.cpp +++ b/src/plugins/Ui/skinned/windowsystem.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * Based on Licq * * Copyright (C) 2006-2009 Licq developers * - * Copyright (C) 2011 Ilya Kotov * + * Copyright (C) 2011-2013 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 * @@ -209,5 +209,23 @@ unsigned char* WindowSystem::getWindowProperty(WId win, const char* prop) return retValue; } +//On RTL locales Qt sets flag NorthEastGravity for windows. +//This function reverts these changes. +void WindowSystem::revertGravity(WId win) +{ + Display* dsp = QX11Info::display(); + XSizeHints sh; + memset(&sh, 0, sizeof(sh)); + long unused; + XGetWMNormalHints(dsp, win, &sh, &unused); + sh.flags |= PWinGravity; + + if(sh.win_gravity == NorthEastGravity) + sh.win_gravity = NorthWestGravity; + else + return; + sh.win_gravity = NorthWestGravity; + XSetWMNormalHints(dsp, win, &sh); +} #endif |
