Skip to content

Commit

Permalink
Merge branch '1.19.x/dev' into 1.20.x/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Kir-Antipov committed Feb 16, 2024
2 parents 58fa5f6 + 64613c6 commit d26fbf5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ yarn_mappings=1.20+build.1
loader_version=0.15.6

# Mod Properties
mod_version=1.0.0
mod_version=1.1.0
maven_group=dev.kir
archives_base_name=cubes-without-borders

Expand Down
12 changes: 1 addition & 11 deletions src/main/java/dev/kir/cubeswithoutborders/mixin/WindowMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.mojang.blaze3d.systems.RenderSystem;
import dev.kir.cubeswithoutborders.client.BorderlessWindowState;
import dev.kir.cubeswithoutborders.util.SystemUtil;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.util.*;
Expand Down Expand Up @@ -120,19 +119,10 @@ private void updateBorderlessWindowRegion(CallbackInfo ci) {
// which resets values of `width` and `height`.
GLFW.glfwSetWindowAttrib(this.handle, GLFW.GLFW_DECORATED, GLFW.GLFW_FALSE);

// There's a bug that causes a fullscreen window to flicker when it loses focus.
// As far as I know, this is relevant for Windows and X11 desktops.
// Fuck X11 - it's a perpetually broken piece of legacy.
// However, we do need to implement a fix for Windows desktops, as they
// are not going anywhere in the foreseeable future (sadly enough).
// This "fix" involves not bringing a window into a "proper" fullscreen mode,
// but rather stretching it 1 pixel beyond the screen's supported resolution.
int heightOffset = SystemUtil.isWindows() ? 1 : 0;

this.x = 0;
this.y = 0;
this.width = videoMode.getWidth();
this.height = videoMode.getHeight() + heightOffset;
this.height = videoMode.getHeight();
GLFW.glfwSetWindowMonitor(this.handle, 0L, this.x, this.y, this.width, this.height, -1);

this.currentBorderless = true;
Expand Down
15 changes: 0 additions & 15 deletions src/main/java/dev/kir/cubeswithoutborders/util/SystemUtil.java

This file was deleted.

0 comments on commit d26fbf5

Please sign in to comment.