Skip to content

Commit

Permalink
More Zoom VSTGUI Workarounds (#530)
Browse files Browse the repository at this point in the history
Linux apparently has even one more extra transform of
the frame position when scale != 1; so unwind one
extra with a comment. We should fix whatever code paths
are making this wrong once we have a vstgui fork, obviously.

Fixes a problem reported in #525 by @tank-trax
  • Loading branch information
baconpaul authored Feb 7, 2019
1 parent b46fa12 commit b80c795
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/common/gui/SurgeGUIEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2595,7 +2595,20 @@ CPoint SurgeGUIEditor::getCurrentMouseLocationCorrectedForVSTGUIBugs()
CGraphicsTransform vstfix = frame->getTransform().inverse();
vstfix.transform(where);
vstfix.transform(where);

#if LINUX
/*
** FIXME: For some reason, linux is even one more transform broken than Mac and Windows.
** There is a vstgui bug here we need to find, but for now, if you have a hammer, the whole
** world looks like a nail, as they say.
**
** This change still leaves menus near the edge of the window mis-clipped in zoom.
*/
vstfix.transform(where);
#endif

#endif


return where;
}
Expand Down

0 comments on commit b80c795

Please sign in to comment.