unknowIfGuestInDream / tlstudio

Currently includes SWT examples, and will support jface and other examples in the future
Eclipse Public License 2.0
1 stars 0 forks source link

[Feature Request] 屏蔽掉视图窗口上的右键弹出菜单 #155

Closed unknowIfGuestInDream closed 3 weeks ago

unknowIfGuestInDream commented 3 weeks ago

Checklist

Describe the feature

PlatformUI.getWorkbench().getDisplay().addFilter(SWT.MouseUp, new Listener() { public void handleEvent(final Event event) { if(event.widget == your editor && event.button == 3) { int hwndCursor = OS.GetCapture (); OS.PostMessage(hwndCursor, OS.WM_LBUTTONDOWN, hwndCursor, OS.HTCLIENT | (OS.WM_MOUSEMOVE << 16)); } } });

Additional context

No response

unknowIfGuestInDream commented 3 weeks ago

其它:org.eclipse.ui.internal.presentations.util包中的StandardViewSystemMenu类控制着这些菜单,还没来得急仔细研究,研究过后再补充