|
2647 | 2647 | [wd.window_object setBackgroundColor:[NSColor colorWithCalibratedRed:0 green:0 blue:0 alpha:0.004f]]; |
2648 | 2648 | } |
2649 | 2649 | // Force update of the window styles. |
2650 | | - NSRect frameRect = [wd.window_object frame]; |
2651 | | - [wd.window_object setFrame:NSMakeRect(frameRect.origin.x, frameRect.origin.y, frameRect.size.width + 1, frameRect.size.height) display:NO]; |
2652 | | - [wd.window_object setFrame:frameRect display:NO]; |
| 2650 | + if ([wd.window_object isVisible]) { |
| 2651 | + NSRect frameRect = [wd.window_object frame]; |
| 2652 | + [wd.window_object setFrame:NSMakeRect(frameRect.origin.x, frameRect.origin.y, frameRect.size.width + 1, frameRect.size.height) display:NO]; |
| 2653 | + [wd.window_object setFrame:frameRect display:NO]; |
| 2654 | + } |
2653 | 2655 | } |
2654 | 2656 | _update_window_style(wd, p_window); |
2655 | 2657 | if (was_visible || [wd.window_object isVisible]) { |
|
2683 | 2685 | wd.layered_window = p_enabled; |
2684 | 2686 | set_window_per_pixel_transparency_enabled(p_enabled, p_window); |
2685 | 2687 | // Force update of the window styles. |
2686 | | - NSRect frameRect = [wd.window_object frame]; |
2687 | | - [wd.window_object setFrame:NSMakeRect(frameRect.origin.x, frameRect.origin.y, frameRect.size.width + 1, frameRect.size.height) display:NO]; |
2688 | | - [wd.window_object setFrame:frameRect display:NO]; |
| 2688 | + if ([wd.window_object isVisible]) { |
| 2689 | + NSRect frameRect = [wd.window_object frame]; |
| 2690 | + [wd.window_object setFrame:NSMakeRect(frameRect.origin.x, frameRect.origin.y, frameRect.size.width + 1, frameRect.size.height) display:NO]; |
| 2691 | + [wd.window_object setFrame:frameRect display:NO]; |
| 2692 | + } |
2689 | 2693 | } break; |
2690 | 2694 | case WINDOW_FLAG_NO_FOCUS: { |
2691 | 2695 | wd.no_focus = p_enabled; |
|
0 commit comments