Skip to content

Commit

Permalink
chore: style
Browse files Browse the repository at this point in the history
  • Loading branch information
litwak913 committed Jan 21, 2025
1 parent a2d5b2d commit df8e135
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
6 changes: 2 additions & 4 deletions core/src/cn/harryh/arkpets/platform/KWinHWndCtrl.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void setForeground() {

@Override
public void setWindowPosition(HWndCtrl insertAfter, int x, int y, int w, int h) {
dBusInterface.MoveResize(hWnd,x,y,new UInt32(w),new UInt32(h));
dBusInterface.MoveResize(hWnd, x, y, new UInt32(w), new UInt32(h));
}

@Override
Expand Down Expand Up @@ -133,7 +133,7 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

KWinHWndCtrl hWndCtrl = (KWinHWndCtrl)o;
KWinHWndCtrl hWndCtrl = (KWinHWndCtrl) o;
return hWnd.equals(hWndCtrl.hWnd);
}

Expand All @@ -156,8 +156,6 @@ private interface ArkPetsInterface extends DBusInterface {

DetailsStruct Details(String winid);

void Alpha(String uuid, double alpha);

boolean IsActive(String uuid);

UInt32 Version();
Expand Down
12 changes: 6 additions & 6 deletions core/src/cn/harryh/arkpets/platform/MutterHWndCtrl.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class MutterHWndCtrl extends HWndCtrl {
private static ArkPetsInterface dBusInterface;

protected MutterHWndCtrl(DetailsStruct details) {
super(details.title, new WindowRect(details.y, details.y + details.h.intValue(), details.x, details.x + details.w.intValue()));
super(details.title, new WindowRect(details.y, details.y + details.h.intValue(), details.x, details.x + details.w.intValue()));
this.hWnd = details.id;
this.details = details;
}
Expand Down Expand Up @@ -65,7 +65,7 @@ public void setTransparent(boolean enable) {

@Override
public void setTaskbar(boolean enable) {
dBusInterface.Stick(hWnd,!enable);
dBusInterface.Stick(hWnd, !enable);
}

@Override
Expand All @@ -75,7 +75,7 @@ public void setLayered(boolean enable) {

@Override
public void setTopmost(boolean enable) {
dBusInterface.Above(hWnd,enable);
dBusInterface.Above(hWnd, enable);
}

@Override
Expand Down Expand Up @@ -129,7 +129,7 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

MutterHWndCtrl hWndCtrl = (MutterHWndCtrl)o;
MutterHWndCtrl hWndCtrl = (MutterHWndCtrl) o;
return hWnd.equals(hWndCtrl.hWnd);
}

Expand All @@ -144,9 +144,9 @@ private interface ArkPetsInterface extends DBusInterface {

void Activate(UInt32 winid);

void Above(UInt32 winid,boolean above);
void Above(UInt32 winid, boolean above);

void Stick(UInt32 winid,boolean stick);
void Stick(UInt32 winid, boolean stick);

List<DetailsStruct> List();

Expand Down
2 changes: 1 addition & 1 deletion core/src/cn/harryh/arkpets/platform/WindowSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static WindowSystem detectWindowSystem() {
*/
public static void init(WindowSystem platform) {
PLATFORM = platform;
if (PLATFORM == WindowSystem.AUTO){
if (PLATFORM == WindowSystem.AUTO) {
PLATFORM = detectWindowSystem();
}
Logger.info("System", "Using " + PLATFORM.toString() + " Window System");
Expand Down
8 changes: 4 additions & 4 deletions core/src/cn/harryh/arkpets/platform/X11HWndCtrl.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public class X11HWndCtrl extends HWndCtrl {
public static final int STATE_ADD = 1;

public X11HWndCtrl(X11Ext.Window hWnd) {
super(winText(hWnd),getWindowRect(hWnd));
this.hWnd=hWnd;
super(winText(hWnd), getWindowRect(hWnd));
this.hWnd = hWnd;
}

public static void init() {
Expand Down Expand Up @@ -184,7 +184,7 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

X11HWndCtrl hWndCtrl = (X11HWndCtrl)o;
X11HWndCtrl hWndCtrl = (X11HWndCtrl) o;
return hWnd.equals(hWndCtrl.hWnd);
}

Expand Down Expand Up @@ -371,7 +371,7 @@ private static Integer getIntProperty(X11.Window hWnd, X11.Atom xa_prop_type, X1
private static boolean visible(X11.Window hWnd) {
X11.XWindowAttributes attr = new X11.XWindowAttributes();
x11.XGetWindowAttributes(display, hWnd, attr);
if (attr.map_state != x11.IsViewable) {
if (attr.map_state != X11.IsViewable) {
return false;
}
X11.Window root = x11.XDefaultRootWindow(display);
Expand Down

0 comments on commit df8e135

Please sign in to comment.