Aric Stewart aric@codeweavers.com wrote:
The problem is that there is no XK keycode for just Shift, Control or Menu so X11DRV_MapVirtualKeyEx maps them to Shift_L, etc. As a result the string XKeysymToString returns is a string with a _L or _R at the end, even if the "don't care" bit is set.
try4: Formatting changes suggested by Dmitry Timoshkov
How abot the casts? And spacing is still not consitent.
which cast are you finding to be unneccessary?
-aric
On 12/01/20 10:26, Dmitry Timoshkov wrote:
Aric Stewartaric@codeweavers.com wrote:
The problem is that there is no XK keycode for just Shift, Control or Menu so X11DRV_MapVirtualKeyEx maps them to Shift_L, etc. As a result the string XKeysymToString returns is a string with a _L or _R at the end, even if the "don't care" bit is set.
try4: Formatting changes suggested by Dmitry Timoshkov
How abot the casts? And spacing is still not consitent.
Aric Stewart aric@codeweavers.com wrote:
which cast are you finding to be unneccessary?
Are there that many of them? I see only one.
That is why I am questioning, The one in the TRACE statement
1) is the same as used later in the code, so retains consistency. 2) generates a compiler warning if i remove it so appears to be useful.
-aric
On 12/01/20 10:57, Dmitry Timoshkov wrote:
Aric Stewartaric@codeweavers.com wrote:
which cast are you finding to be unneccessary?
Are there that many of them? I see only one.
Aric Stewart aric@codeweavers.com wrote:
That is why I am questioning, The one in the TRACE statement
- is the same as used later in the code, so retains consistency.
- generates a compiler warning if i remove it so appears to be useful.
For sure there are other ways to avoid compiler warnings, one of them is to use a correct printf format specifier.