Cloudef / monsterwm-xcb

Port of monsterwm to xcb
Other
35 stars 10 forks source link

Add keyboard shortcut to move mouse pointer to rightmost screen edge #7

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi @Cloudef ,

I have implemented the ability to move the mouse pointer to the rightmost screen edge. It is activated using MOD1 + m, if using defaults. This might be useful for when the mouse pointer is obstructing visuals. The mouse pointer always retains its Y-position; only the X-position is changed.

Additionally, I have also fixed the following compiler warning, when using gcc 6.2.1:

monsterwm.c: In function ‘mousemotion’:
monsterwm.c:733:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
         if (e) free(e); xcb_flush(dis);
         ^~
monsterwm.c:733:25: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
         if (e) free(e); xcb_flush(dis);
                         ^~~~~~~~~

Thanks for the XCB port of MonsterWM.