Skip to content

Commit

Permalink
Release 1.2.2
Browse files Browse the repository at this point in the history
Fixed overlay capture feature
  • Loading branch information
Morph21 committed Feb 8, 2022
1 parent efaa2a3 commit 897ab9a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mercury.platform.core;

public class MercuryConstants {
public static final String APP_VERSION = "1.2.1";
public static final String APP_VERSION = "1.2.2";
public static final String SERVER_HOST = "exslims.ddns.net";
public static final int PORT = 5555;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.mercury.platform.ui.adr.components.panel.AdrComponentPanel;
import com.mercury.platform.ui.frame.AbstractOverlaidFrame;
import com.mercury.platform.ui.misc.MercuryStoreUI;
//import com.sun.awt.AWTUtilities;
import com.sun.jna.Native;
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WinDef;
Expand All @@ -29,9 +28,20 @@ public abstract class AbstractAdrFrame<T extends AdrComponentDescriptor> extends
protected AbstractAdrFrame(T descriptor) {
super();
this.descriptor = descriptor;
//AWTUtilities.setWindowOpaque(this, false);
setWindowOpaque(this, false);

}

private void setWindowOpaque(Window window, boolean opaque) {
Color bg = window.getBackground();
if (bg == null) {
bg = new Color(0, 0, 0, 0);
}
window.setBackground(new Color(bg.getRed(), bg.getGreen(), bg.getBlue(),
opaque ? 255 : 0));
}


private static WinDef.HWND getHWnd(Component w) {
WinDef.HWND hwnd = new WinDef.HWND();
hwnd.setPointer(Native.getComponentPointer(w));
Expand Down Expand Up @@ -71,8 +81,8 @@ private void setTransparent(Component w) {
this.componentHwnd = getHWnd(w);
this.settingWl = User32.INSTANCE.GetWindowLong(componentHwnd, WinUser.GWL_EXSTYLE);
int transparentWl = User32.INSTANCE.GetWindowLong(componentHwnd, WinUser.GWL_EXSTYLE) |
WinUser.WS_EX_LAYERED |
WinUser.WS_EX_TRANSPARENT;
WinUser.WS_EX_LAYERED |
WinUser.WS_EX_TRANSPARENT;
User32.INSTANCE.SetWindowLong(componentHwnd, WinUser.GWL_EXSTYLE, transparentWl);
}
}
Expand Down
8 changes: 8 additions & 0 deletions app-ui/src/main/resources/notes/patch/patch-notes-new.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[
{
"version": "1.2.2",
"fix": [
{
"changed": "Fixed overlay capture feature"
}
]
},
{
"version": "1.2.1",
"fix": [
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>pom</packaging>

<properties>
<project.version>1.2.1</project.version>
<project.version>1.2.2</project.version>

<jnativehook.version>2.0.2</jnativehook.version>
<devjna.version>4.4.0</devjna.version>
Expand Down
8 changes: 4 additions & 4 deletions release_files/release_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
<opt>-XX:+UseG1GC</opt>
</jre>
<versionInfo>
<fileVersion>1.2.1.0</fileVersion>
<txtFileVersion>1.2.1</txtFileVersion>
<fileVersion>1.2.2.0</fileVersion>
<txtFileVersion>1.2.2</txtFileVersion>
<fileDescription>MercuryTrade</fileDescription>
<copyright>Morph21</copyright>
<productVersion>1.2.1.0</productVersion>
<txtProductVersion>1.2.1</txtProductVersion>
<productVersion>1.2.2.0</productVersion>
<txtProductVersion>1.2.2</txtProductVersion>
<productName>MercuryTrade</productName>
<companyName>Morph</companyName>
<internalName>MercuryTrade</internalName>
Expand Down

0 comments on commit 897ab9a

Please sign in to comment.