Skip to content

Commit

Permalink
Don't force borderless mode when using per-pixel transparency
Browse files Browse the repository at this point in the history
  • Loading branch information
Technohacker committed May 10, 2020
1 parent 9584f24 commit 0456311
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions platform/osx/os_osx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2661,7 +2661,6 @@ static int get_screen_index(NSScreen *screen) {
if (!is_layered_allowed()) return;
if (layered_window != p_enabled) {
if (p_enabled) {
set_borderless_window(true);
GLint opacity = 0;
[window_object setBackgroundColor:[NSColor clearColor]];
[window_object setOpaque:NO];
Expand Down Expand Up @@ -2691,9 +2690,6 @@ static int get_screen_index(NSScreen *screen) {
if (p_borderless) {
[window_object setStyleMask:NSWindowStyleMaskBorderless];
} else {
if (layered_window)
set_window_per_pixel_transparency_enabled(false);

[window_object setStyleMask:NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskMiniaturizable | (resizable ? NSWindowStyleMaskResizable : 0)];

// Force update of the window styles
Expand Down
4 changes: 0 additions & 4 deletions platform/windows/os_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2210,7 +2210,6 @@ void OS_Windows::set_window_per_pixel_transparency_enabled(bool p_enabled) {
if (!is_layered_allowed()) return;
if (layered_window != p_enabled) {
if (p_enabled) {
set_borderless_window(true);
//enable per-pixel alpha

DWM_BLURBEHIND bb = { 0 };
Expand Down Expand Up @@ -2239,9 +2238,6 @@ void OS_Windows::set_borderless_window(bool p_borderless) {
if (video_mode.borderless_window == p_borderless)
return;

if (!p_borderless && layered_window)
set_window_per_pixel_transparency_enabled(false);

video_mode.borderless_window = p_borderless;

preserve_window_size = true;
Expand Down
4 changes: 0 additions & 4 deletions platform/x11/os_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,6 @@ void OS_X11::set_window_per_pixel_transparency_enabled(bool p_enabled) {
if (!is_layered_allowed()) return;
if (layered_window != p_enabled) {
if (p_enabled) {
set_borderless_window(true);
layered_window = true;
} else {
layered_window = false;
Expand Down Expand Up @@ -1683,9 +1682,6 @@ void OS_X11::set_borderless_window(bool p_borderless) {
if (get_borderless_window() == p_borderless)
return;

if (!p_borderless && layered_window)
set_window_per_pixel_transparency_enabled(false);

current_videomode.borderless_window = p_borderless;

Hints hints;
Expand Down

0 comments on commit 0456311

Please sign in to comment.