10-30-2015, 02:27 AM
This is seems like a fix ...
Code:
get_mouse_state() ->
wx:batch(fun() ->
MS = wx_misc:getMouseState(),
#wxMouseState{x=X0, y=Y0, %% integer()
leftDown=Left,
middleDown=Middle,
rightDown=Right %% bool()
} = MS,
{X,Y} = wxWindow:screenToClient(get(gl_canvas), {X0,Y0}),
C = wings_io:is_modkey_pressed(?CTRL_BITS),
if (C andalso Right) -> % example ... used by Nendo two button folks.
{gui_state([{Left, ?SDL_BUTTON_LMASK},
{true, ?SDL_BUTTON_MMASK},
{false, ?SDL_BUTTON_RMASK}], 0), X, Y};
true ->
{gui_state([{Left, ?SDL_BUTTON_LMASK},
{Middle, ?SDL_BUTTON_MMASK},
{Right, ?SDL_BUTTON_RMASK}], 0), X, Y}
end
end).