mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-16 22:12:06 +00:00
Fixed: Windows Aero problem with maximize button - drawing maximize button on mouse down
This commit is contained in:
@@ -297,10 +297,10 @@ public final class MainFrameRibbon extends AppRibbonFrame {
|
||||
4,
|
||||
SubstanceSizeUtils.getTitlePaneIconSize(),
|
||||
SubstanceSizeUtils.getTitlePaneIconSize()
|
||||
);
|
||||
);
|
||||
}
|
||||
};
|
||||
titlePane.addComponentListener(ad);
|
||||
};
|
||||
titlePane.addComponentListener(ad);
|
||||
|
||||
ad.componentShown(null);
|
||||
|
||||
@@ -317,8 +317,35 @@ public final class MainFrameRibbon extends AppRibbonFrame {
|
||||
return new WinDef.LRESULT(0);
|
||||
}
|
||||
if (uMsg == WinUser.WM_NCMOUSEMOVE) {
|
||||
User32.INSTANCE.PostMessage(hWnd, WinUser.WM_MOUSEMOVE, wParam, lParam);
|
||||
if (wParam.intValue() == WinUser.HTMAXBUTTON) {
|
||||
User32.INSTANCE.PostMessage(hwnd, WinUser.WM_MOUSEMOVE, new WinDef.WPARAM(0), lParam);
|
||||
return new WinDef.LRESULT(0);
|
||||
}
|
||||
}
|
||||
if (uMsg == WinUser.WM_NCMOUSEHOVER) {
|
||||
if (wParam.intValue() == WinUser.HTMAXBUTTON) {
|
||||
User32.INSTANCE.PostMessage(hwnd, WinUser.WM_MOUSEHOVER, new WinDef.WPARAM(0), lParam);
|
||||
return new WinDef.LRESULT(0);
|
||||
}
|
||||
}
|
||||
if (uMsg == WinUser.WM_NCMOUSELEAVE) {
|
||||
if (wParam.intValue() == WinUser.HTMAXBUTTON) {
|
||||
User32.INSTANCE.PostMessage(hwnd, WinUser.WM_MOUSELEAVE, new WinDef.WPARAM(0), lParam);
|
||||
return new WinDef.LRESULT(0);
|
||||
}
|
||||
}
|
||||
if (uMsg == WinUser.WM_NCLBUTTONDOWN) {
|
||||
if (wParam.intValue() == WinUser.HTMAXBUTTON) {
|
||||
User32.INSTANCE.PostMessage(hwnd, WinUser.WM_LBUTTONDOWN, new WinDef.WPARAM(WinUser.MK_LBUTTON), lParam);
|
||||
return new WinDef.LRESULT(0);
|
||||
}
|
||||
}
|
||||
if (uMsg == WinUser.WM_NCLBUTTONUP) {
|
||||
if (wParam.intValue() == WinUser.HTMAXBUTTON) {
|
||||
User32.INSTANCE.PostMessage(hwnd, WinUser.WM_LBUTTONUP, new WinDef.WPARAM(WinUser.MK_LBUTTON), lParam);
|
||||
return new WinDef.LRESULT(0);
|
||||
}
|
||||
}
|
||||
if (uMsg == WinUser.WM_NCHITTEST) {
|
||||
int y = (short) ((lParam.longValue() >> 16) & 0xFFFF);
|
||||
int x = (short) (lParam.longValue() & 0xFFFF);
|
||||
|
||||
@@ -1483,4 +1483,6 @@ public interface User32 extends StdCallLibrary, WinUser {
|
||||
|
||||
Pointer SetWindowLongPtr(WinDef.HWND hWnd, int nIndex, Callback wndProc);
|
||||
|
||||
|
||||
BOOL ScreenToClient(WinDef.HWND hWnd, POINT lpPoint);
|
||||
}
|
||||
|
||||
@@ -1054,7 +1054,7 @@ public interface WinDef extends StdCallLibrary {
|
||||
public static final int SIZE = 4;
|
||||
|
||||
public BOOL() {
|
||||
super(0);
|
||||
this(0); // JPEXS fix
|
||||
}
|
||||
|
||||
public BOOL(long value) {
|
||||
|
||||
@@ -447,8 +447,18 @@ public interface WinUser extends StdCallLibrary, WinDef {
|
||||
int WM_NCCALCSIZE = 0x0083;
|
||||
int WM_NCHITTEST = 0x0084;
|
||||
int WM_NCMOUSEMOVE = 0x00A0;
|
||||
int WM_NCLBUTTONDOWN = 0x00A1;
|
||||
int WM_NCLBUTTONUP = 0x00A2;
|
||||
int WM_NCMOUSEHOVER = 0x02A0;
|
||||
int WM_NCMOUSELEAVE = 0x02A2;
|
||||
|
||||
int WM_MOUSEMOVE = 0x0200;
|
||||
int WM_LBUTTONDOWN = 0x0201;
|
||||
int WM_LBUTTONUP = 0x0202;
|
||||
|
||||
int MK_LBUTTON = 0x0001;
|
||||
int WM_MOUSEHOVER = 0x02A1;
|
||||
int WM_MOUSELEAVE = 0x02A3;
|
||||
|
||||
int HTCLIENT = 1;
|
||||
int HTCAPTION = 2;
|
||||
|
||||
Reference in New Issue
Block a user