Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
/ jdk16 Public archive

Commit

Permalink
8245922: [macos] Taskbar.Feature.ICON_BADGE_NUMBER no longer supporte…
Browse files Browse the repository at this point in the history
…d on MacOS

Reviewed-by: kcr, prr
  • Loading branch information
mrserb committed Dec 26, 2020
1 parent 3f67afd commit fb607f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
13 changes: 1 addition & 12 deletions src/java.desktop/macosx/classes/apple/laf/JRSUIUtils.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -36,17 +36,12 @@ public final class JRSUIUtils {

static boolean isLeopard = isMacOSXLeopard();
static boolean isSnowLeopardOrBelow = isMacOSXSnowLeopardOrBelow();
static boolean isCatalinaOrAbove = isMacOSXCatalinaOrAbove();
static boolean isBigSurOrAbove = isMacOSXBigSurOrAbove();

public static boolean isMacOSXBigSurOrAbove() {
return currentMacOSXVersionMatchesGivenVersionRange(16, true, false, true);
}

static boolean isMacOSXCatalinaOrAbove() {
return currentMacOSXVersionMatchesGivenVersionRange(15, true, false, true);
}

static boolean isMacOSXLeopard() {
return isCurrentMacOSXVersion(5);
}
Expand Down Expand Up @@ -84,12 +79,6 @@ static boolean currentMacOSXVersionMatchesGivenVersionRange(
return false;
}

public static class TaskBar {
public static boolean isIconBadgeSupported() {
return !isCatalinaOrAbove;
}
}

public static class TabbedPane {
public static boolean useLegacyTabs() {
return isLeopard;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -25,14 +25,12 @@

package sun.lwawt.macosx;

import com.apple.eawt.Application;
import java.awt.Image;
import java.awt.PopupMenu;
import java.awt.Taskbar.Feature;
import java.awt.peer.TaskbarPeer;

import apple.laf.JRSUIUtils;
import com.apple.eawt.Application;

final public class CTaskbarPeer implements TaskbarPeer {

CTaskbarPeer() {}
Expand All @@ -42,7 +40,6 @@ public boolean isSupported(Feature feature) {
switch(feature) {
case ICON_BADGE_TEXT:
case ICON_BADGE_NUMBER:
return JRSUIUtils.TaskBar.isIconBadgeSupported();
case ICON_IMAGE:
case MENU:
case PROGRESS_VALUE:
Expand Down

1 comment on commit fb607f1

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.