Method and system for displaying screen watermark on Mac system

By encapsulating the NSPanel class and implementing it in the Cocoa library, the problem that Mac computers cannot display screen watermarks is solved, and watermark display is realized in multi-desktop and full-screen modes is realized, effectively preventing data leakage, good compatibility, and is suitable for Intel and M1 chips.

CN114240726BActive Publication Date: 2025-08-29BEIJING E-SAFENET SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111646677.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-08-29
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

Existing Mac computers cannot display screen watermarks and do not support watermark effects in multi-desktop and full-screen states, resulting in an increased risk of data leakage.

Method used

By encapsulating the NSPanel class, setting it as a colorless transparent artboard, and watermark display is implemented in the Cocoa library of MacOS, supporting full-screen and multi-desktop modes, and dynamically drawing watermarks with policy information.

Benefits of technology

It realizes reliable and compatible screen watermark display on Mac computers, which can effectively prevent photos and screenshot leaks, supports multi-desktop and full-screen modes, is compatible with Intel and M1 chips, and does not affect the normal use of other software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114240726B_ABST
    Figure CN114240726B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of data security technology and discloses a method and system for displaying a screen watermark on a Mac system, comprising: instantiating the NSPanel class as a watermark window, setting the background color to transparent and borderless; transforming the NSPanel class into a colorless and transparent drawing board through settings; setting the layer to be one level higher than NSMainMenuWindowLevel so that the NSPanel is always displayed at the top of the screen; enabling the watermark window to support full screen and multiple desktops through property settings; instantiating the NSPanel object as the layer for drawing the screen watermark; and drawing the watermark content on the NSPanel layer in accordance with the issued policy. Based on the Cocoa library of macOS, the present invention implements the function of displaying a watermark on the Mac computer screen by encapsulating the NSPanel class, thereby protecting Mac terminal data and effectively preventing leaks through methods such as taking photos and screenshots.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data security, and in particular relates to a method and system for displaying a screen watermark on a Mac system. Background Art

[0002] With the advancement of computer and network technologies, more and more data is being stored in computers. While electronic data offers convenience in storage and transmission, it also poses data security challenges. In recent years, incidents of data leaks involving businesses, institutions, and individuals through photography, video recording, and screenshots have become increasingly common. The inability to track down the source of data leaks has long been a vexing problem. Screen watermarks offer a promising solution to this problem. Displaying a visible watermark on the screen can mitigate the risk of data leaks to a limited extent, while also effectively deterring those attempting to leak data through methods like photography and raising awareness of information security.

[0003] There is no mature watermark display technology on the market now, and it does not support watermark display in multiple desktops or full-screen states. The present invention is intended to solve the problem of watermark display on Mac computers. Summary of the Invention

[0004] To overcome the problems existing in the related prior art, the present invention provides a method and system for displaying screen watermarks on a Mac system, and more particularly, a method and system for dynamically displaying screen watermarks based on a policy. This method aims to address the problems that existing Mac computers cannot display screen watermarks and cannot support watermark effects in multiple desktops or full-screen mode. The technical solutions adopted by the present invention are as follows:

[0005] The method for displaying a screen watermark on a Mac system provided by the present invention comprises the following steps:

[0006] Step 1: Encapsulate the NSPanel class;

[0007] Step 2: Remove the border and background color;

[0008] Step 3: Draw the watermark style;

[0009] Step 4. Set it to display at the top of the screen and support full screen and multi-desktop modes.

[0010] Furthermore, the above method specifically includes:

[0011] Instantiate the NSPanel class as the watermark window, set the background color to transparent and borderless;

[0012] By setting, the NSPanel class becomes a colorless and transparent drawing board;

[0013] By setting the layer to be one level higher than NSMainMenuWindowLevel, NSPanel is always displayed at the top of the screen;

[0014] Through property settings, the watermark window supports full screen and multiple desktops;

[0015] Instantiate an NSPanel object as the layer for drawing the screen watermark;

[0016] Based on the issued strategy, draw the watermark content on the Layer layer of NSPanel.

[0017] Furthermore, the above method also includes:

[0018] Custom type WaterPanel, inherited from NSPanel, and override the initWithContentRect method;

[0019] Customize WaterView, inherit from NSView, and override the drawRect method to draw the watermark information;

[0020] Initialize the WaterPanel object using the current screen size and add the screen watermark view to the WaterPanel;

[0021] By parsing the policy issued by the background, the watermark style to be drawn is obtained, and the watermark is drawn through EstWatermarkView.

[0022] Furthermore, by setting the collectionBehavior property of NSPanel, full screen and multi-desktop modes are supported.

[0023] Furthermore, by setting the hasShadow and backgroundColor properties of NSPanel, the screen is made colorless and transparent without shadows.

[0024] Furthermore, the watermark policy is obtained through the application server, and the watermark policy is used to determine whether to display the watermark, as well as the style and content of the watermark display.

[0025] Furthermore, after obtaining the watermark strategy, the watermark information is obtained through parsing, and the watermark is drawn using the obtained watermark information, specifically including:

[0026] Obtain the policy information watermarkInfo.onceInfo through network request;

[0027] Obtain corresponding information through policy information, including: watermark direction direc, machine name machineName, address information addressInfo, custom content customContent, user information userInfo, current time currentDate, font fontName and font color rgbaValue;

[0028] Draw the screen watermark by obtaining the policy information.

[0029] Furthermore, in the above step of obtaining the policy information and drawing the screen watermark, the following steps are further included:

[0030] Concatenate the strings and separate the corresponding information with line breaks;

[0031] Use attributed strings to set the style of the string;

[0032] Customize EstWatermarkTextLayer, inherit from CATextLayer, and draw the watermark information into EstWatermarkTextLayer.

[0033] Another object of the present invention is to provide a system for displaying a screen watermark on a Mac system using the method for displaying a screen watermark on a Mac system described above, the system comprising:

[0034] NSPanel class encapsulation module, used to instantiate the NSPanel class as a watermark window;

[0035] The property setting module is used to set the display to the top of the screen and support full screen and multi-desktop modes;

[0036] A policy information acquisition module is used to obtain watermark policies through an application server;

[0037] The watermark drawing module is used to draw the screen watermark style through the obtained policy information.

[0038] Furthermore, the system further includes a computer device, the computer device including a memory and a processor, the memory storing a computer program, and when the computer program is executed by the processor, causing the processor to perform the following steps:

[0039] Instantiate the NSPanel class as the watermark window, set the background color to transparent and borderless; through settings, make the NSPanel class become a colorless and transparent drawing board; by setting the layer one level higher than NSMainMenuWindowLevel, make NSPanel always appear at the top of the screen; through property settings, make the watermark window support full screen and multiple desktops; instantiate the NSPanel object as the layer for drawing the screen watermark; combined with the issued strategy, draw the watermark content on the Layer layer of NSPanel.

[0040] Furthermore, the above system also includes a computer-readable storage medium storing a computer program. When the computer program is executed by the processor, the processor executes the steps of the method for displaying a screen watermark on a Mac system.

[0041] Furthermore, the above system also includes an information data processing terminal, which is used to implement the method of displaying screen watermarks on a Mac system described above.

[0042] In combination with the technical solutions described above, the advantages and beneficial effects of the present invention include:

[0043] The method for displaying a screen watermark on a Mac system provided by the present invention is implemented based on the Cocoa library of MacOS. It realizes the function of displaying a watermark on the Mac computer screen by encapsulating the NSPanel class, which mainly solves the problem of displaying a screen watermark on a Mac computer. It is compatible with Intel and M1 chips, and can protect Mac terminal data and effectively prevent leakage of photos and screenshots.

[0044] The present invention has the characteristics of strong reliability, good compatibility, good portability, low dependence on the development environment, little impact on existing code, low coupling, and high aggregation. It supports display in multiple desktops, full-screen mode and other modes, is compatible with Intel and M1 chips at the same time, and can be quickly integrated into any software.

[0045] This invention can protect Mac terminal data, effectively prevent the risk of leaking information through taking photos or screenshots, and achieve the effect of tracking leaked terminal information. This invention supports Mac computers in multiple desktops and full-screen mode, and can display well when switching desktops or creating new desktops, without affecting the use of other computer software.

[0046] The present invention is used together with the corresponding security policy, and the watermark policy can be obtained through the application server to configure and control the display and hiding of the watermark, as well as the content, color, and depth of the watermark display.

[0047] The Cocoa-based screen watermark anti-leakage protection solution disclosed in the present invention is created based on native views, has good compatibility and high reliability, and while implementing screen watermarks, does not excessively interfere with the operation of other apps and system processes, and has high system reliability.

[0048] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory and are not intended to limit the scope of protection of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0050] Figure 1 A flowchart of a method for displaying a screen watermark on a Mac system provided by an embodiment of the present invention;

[0051] Figure 2 A schematic diagram of a method for displaying a screen watermark on a Mac system provided by an embodiment of the present invention;

[0052] Figure 3 A block diagram of the system structure for displaying screen watermarks on a Mac system provided by an embodiment of the present invention;

[0053] Figure 4 This is a specific implementation flowchart of displaying a screen watermark on a Mac system provided by an embodiment of the present invention.

[0054] In the picture:

[0055] 1. NSPanel class encapsulation module; 2. Property setting module; 3. Policy information acquisition module; 4. Watermark drawing module. DETAILED DESCRIPTION

[0056] To make the above-mentioned objects, features, and advantages of the present invention more readily apparent, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. The following description sets forth numerous specific details to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art may make similar modifications without departing from the scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0057] In view of the problems existing in the prior art, the present invention provides a method and system for displaying screen watermarks on a Mac system. The present invention is described in detail below with reference to the accompanying drawings.

[0058] like Figure 1 As shown, the method for displaying a screen watermark on a Mac system provided by an embodiment of the present invention includes the following steps:

[0059] S101, encapsulate the NSPanel class;

[0060] S102, remove border and background color;

[0061] S103, drawing a watermark style;

[0062] S104, the setting is displayed at the top of the screen, and the setting supports full screen and multi-desktop modes.

[0063] The principle diagram of the method for displaying screen watermark on Mac system provided by the embodiment of the present invention is as follows Figure 2 shown.

[0064] like Figure 3 As shown, the system for displaying a screen watermark on a Mac system provided by an embodiment of the present invention includes:

[0065] NSPanel class encapsulation module 1 is used to instantiate the NSPanel class as the watermark window;

[0066] Property setting module 2, used to set the display to the top of the screen and support full screen and multi-desktop modes;

[0067] Policy information acquisition module 3, used to obtain watermark policy through the application server;

[0068] The watermark drawing module 4 is used to draw a screen watermark style according to the acquired policy information.

[0069] The technical solution of the present invention is further described below in conjunction with embodiments.

[0070] First embodiment

[0071] This embodiment provides a method for dynamically displaying a screen watermark according to a policy.

[0072] Since Mac computers cannot display screen watermarks and cannot support watermark effects in multiple desktops or full-screen mode, this embodiment can display screen watermarks on the Mac computer desktop. The specific technical solution is as follows:

[0073] Displaying multiple screen watermarks using the Cocoa library of MacOS involves the following steps:

[0074] The macOS screen watermarking technology is implemented using the NSPanel class in the Cocoa library. It redraws the CALayer layer of the NSPanel and sets the window to be displayed on the top layer, supporting multiple desktops and full-screen mode.

[0075] The specific process of encapsulating the NSPanel class includes:

[0076] 1. Instantiate the NSPanel class as the watermark window. First, set its background color to transparent and borderless. This will turn the NSPanel class into a colorless and transparent drawing board. The specific setting process is as follows:

[0077] self.backgroundColor=NSColor.clearColor;

[0078] self.opaque = NO;

[0079] self.hasShadow=NO;

[0080] 2. By setting the layer to be one level higher than NSMainMenuWindowLevel, you can ensure that NSPanel is always displayed at the top of the screen and will not be covered by other windows. The specific settings are as follows:

[0081] self.level=NSMainMenuWindowLevel+1;

[0082] 3. Set the watermark form to ignore mouse events. In this case, mouse events will not be intercepted by the watermark form. The specific settings are as follows:

[0083] self.ignoresMouseEvents=YES;

[0084] 4. By setting the following properties, the watermark window can support full screen and multiple desktops. The specific settings are as follows:

[0085] self.hidesOnDeactivate=NO;

[0086] self.collectionBehavior=

[0087] NSWindowCollectionBehaviorCanJoinAllSpaces|NSWindowCollectionBehaviorStationary;

[0088] self.displaysWhenScreenProfileChanges=YES;

[0089] 5. Instantiate an NSPanel object as the layer for drawing the screen watermark. The specific settings are as follows:

[0090] -(void)show1

[0091] {

[0092] NSView*view=[[NSView alloc]initWithFrame:self.panel.frame];

[0093] self.panel.contentView=view;

[0094] [self.panel makeKeyAndOrderFront:nil];

[0095] }

[0096] 6. Based on the issued strategy, draw the watermark content on the Layer layer of NSPanel.

[0097] In combination with the technical solutions described above, the advantages and beneficial effects of this embodiment include:

[0098] (1) Developed based on native components, with good compatibility;

[0099] (2) The logic is simple and clear, easy to transplant and conducive to secondary development;

[0100] (3) Display is controlled by server-side policies, making it easy to set up and update.

[0101] This invention is based on the Cocoa library of macOS and implements the watermark display function on Mac computer screens by encapsulating the NSPanel class. It features strong reliability, good compatibility, and portability, with low dependence on the development environment, minimal impact on existing code, low coupling, and high aggregation. It also supports display in multiple desktops and full-screen modes, and is compatible with both Intel and M1 chips. This solution can protect Mac terminal data, effectively preventing the risk of leaks through photos and screenshots, and can track leaked terminal information.

[0102] The technical solution described in this embodiment supports multiple desktops and full-screen mode on Mac computers, ensuring smooth display when switching desktops or creating new desktops, without affecting the use of other computer software. This embodiment, when used in conjunction with corresponding security policies, allows the display and hiding of watermarks, as well as the content, color, and depth of the watermark display, to be controlled through the watermark policy configuration of the application server.

[0103] This embodiment proposes a Cocoa-based screen watermarking and anti-leakage protection solution. This solution is built entirely on native views, has good compatibility and high reliability. While implementing screen watermarking, it does not excessively interfere with the operation of other apps and system processes, and has high system reliability. The present invention also has the characteristics of low coupling, high aggregation, native controls, strong compatibility, and simple use, and can be quickly integrated into any software.

[0104] Second embodiment

[0105] This embodiment provides a method for displaying multiple screen watermarks on a Mac computer, including: customizing the WaterPanel type, inheriting from NSPanel, and overriding the initWithContentRect method. The specific code is as follows:

[0106] -(id)initWithContentRect:(NSRect)contentRect

[0107] {

[0108] self=[super initWithContentRect:contentRect styleMask:

[0109] (NSWindowStyleMaskBorder less|NSWindowStyleMaskNonactivatingPanel)backing:NSBackingStoreBuffered defer:NO];

[0110] if(self)

[0111] {

[0112] self.backgroundColor=NSColor.clearColor;

[0113] self.level=NSMainMenuWindowLevel+1;

[0114] self.opaque = NO;

[0115] self.hasShadow=NO;

[0116] self.hidesOnDeactivate=NO;

[0117] self.collectionBehavior=

[0118] NSWindowCollectionBehaviorCanJoinAllSpaces|NSWindowCollectionBehaviorStationary;

[0119] self.displaysWhenScreenProfileChanges=YES;

[0120] self.ignoresMouseEvents=YES;

[0121] }

[0122] return self;

[0123] }

[0124] Furthermore, customize WaterView, inherit from NSView, and override the drawRect method. Then, override the drawRect method to draw the watermark information. The specific code is as follows:

[0125] -(void)drawRect:(NSRect)dirtyRect

[0126] {

[0127] [super drawRect:dirtyRect];

[0128] / / Drawing code here.

[0129] }

[0130] Initialize a WaterPanel object using the current screen size and add the screen watermark view to the WaterPanel. The specific code is as follows:

[0131] _instance.panel=[[WaterPanel alloc]initWithContentRect:[NSScreenmainScreen].frame];

[0132] NSView*view=[[WaterView alloc]initWithFrame:self.panel.frame];

[0133] [self.panel.contentView addSubview:watermarkView];

[0134] [self.panel makeKeyAndOrderFront:nil];

[0135] By parsing the policy issued by the background, the watermark style to be drawn is obtained, and the watermark is drawn through EstWatermarkView. The specific code is as follows:

[0136] NSView*view=

[0137] [[WaterView alloc]initWithFrame:self.panel.frame];

[0138] EstWatermarkView*watermarkView=

[0139] [EstWatermarkUtil createWatermarkViewForProcess:

[0140] @""AndWindowView:view];

[0141] [self.panel.contentView addSubview:watermarkView];

[0142] NSDictionary*views=

[0143] NSDictionaryOfVariableBindings(watermarkView);

[0144] NSDictionary*metrics=@{@"padding":@0};

[0145] [self.panel.contentView addConstraints:[NSLayoutConstraintconstraintsWithVisualFormat:@"H:|-padding-[watermarkView]-padding-|"options:0metrics:metrics views:views]];

[0146] [self.panel.contentView addConstraints:[NSLayoutConstraintconstraintsWithVisualFormat:@"V:|-padding-[watermarkView]-padding-|"options:0metrics:metrics views:views]];

[0147] By setting the collectionBehavior property of NSPanel, it supports full-screen and multi-desktop modes. The specific code is as follows:

[0148] self.collectionBehavior=

[0149] NSWindowCollectionBehaviorCanJoinAllSpaces|NSWindowCollectionBehaviorStationary;

[0150] By setting the collectionBehavior property of NSPanel, it supports full-screen and multi-desktop modes. The specific code is as follows:

[0151] self.collectionBehavior=

[0152] NSWindowCollectionBehaviorCanJoinAllSpaces|NSWindowCollectionBehaviorStationary;

[0153] By setting the hasShadow and backgroundColor properties of NSPanel, make it colorless and transparent without shadow. The specific code is as follows:

[0154] self.backgroundColor=NSColor.clearColor;

[0155] self.hasShadow=NO;

[0156] Mac terminals can obtain watermark policies from the application server and use the watermark policies to determine whether to display a watermark, as well as the style and content of the watermark display.

[0157] After obtaining the policy, the watermark information is obtained through parsing, and the watermark is drawn based on the obtained watermark information. The specific steps are as follows:

[0158] 1. Obtain policy information through network request: watermarkInfo.onceInfo;

[0159] 2. Through policy information, you can obtain:

[0160] Watermark direction: direc;

[0161] Machine name: machineName;

[0162] Address information: addressInfo;

[0163] Custom content: customContent;

[0164] User information: userInfo;

[0165] Current time: currentDate;

[0166] font:fontName;

[0167] font-color:rgbaValue;

[0168] 3. Draw a screen watermark by obtaining policy information, including:

[0169] (1) Concatenate the character strings and separate the above information with line breaks. The specific settings are as follows:

[0170] NSString*watermarkStr=

[0171] [NSString stringWithFormat:

[0172] @"%@%@%@%@%@",machineName,addressInfo,customCon,userInfo,currentDate];

[0173] (2) Use attributed strings to set the style of the string. The specific settings are as follows:

[0174] NSAttributedString*attributedStr=

[0175] [[NSAttributedString alloc]initWithString:watermarkStrattributes:@{NSFontAttributeName:

[0176] [NSFont fontWithName:fontName size:layer.frame.size.width / 18-2],NSForegroundColorAttributeName:color}];

[0177] (3) Customize EstWatermarkTextLayer, inherit from CATextLayer, and draw the watermark information into EstWatermarkTextLayer. The specific settings are as follows:

[0178] EstWatermarkTextLayer*layer=[EstWatermarkTextLayer layer];

[0179] layer.alignmentMode=kCAAligmentCenter;

[0180] layer.backgroundColor=[NSColor clearColor].CGColor;

[0181] layer.string=attributedStr;

[0182] Through analysis, it is known whether a watermark needs to be displayed, as well as the content and style of the watermark, and the watermark is displayed using the above-mentioned display requirements of the screen watermark.

[0183] Third embodiment

[0184] like Figure 4 As shown, this embodiment provides a method for implementing a screen watermark, comprising the following steps:

[0185] 1. Determine whether to display a screen watermark by issuing a policy;

[0186] 2. If a screen watermark needs to be displayed, draw the content of the screen watermark by issuing a policy;

[0187] 3. After drawing the screen watermark, clear the previous screen watermark, remove all subviews, and then add the redrawn screen watermark view to prevent the screen watermark from overlapping;

[0188] 4. Place the screen watermark on the top of all layers and set it to support multi-screen and full-screen modes;

[0189] 5. Set the screen watermark view to be responsible for display only and not accept any events, so as not to affect the use of other functions;

[0190] The implementation of this technical solution does not need to consider the system version of MacOS itself and the resolution size of the screen, and does not consider the hardware environment. It can be seamlessly compatible with all models under the X86\ARM architecture. After the implementation of this technical solution, there is no need to consider factors such as the upgrade of the terminal environment. It can seamlessly adapt to all MacOS models and realize the screen watermark to achieve anti-screenshot protection effect.

[0191] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When all or part of the embodiments are implemented in the form of a computer program product, the computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the above embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL) or wireless (e.g., infrared, wireless, microwave, etc.)) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0192] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with this technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the scope of protection of the present invention.

Claims

1. A method for displaying a screen watermark on a Mac system, characterized in that: The method for displaying a screen watermark on a Mac system comprises the following steps: Step 1: Encapsulate the NSPanel class; Step 2: Remove the border and background color; Step 3: Draw the watermark style; Step 4: Set the display to the top of the screen and support full screen and multi-desktop modes; The method further comprises: Instantiate the NSPanel class as the watermark window, set the background color to transparent and borderless; By setting, the NSPanel class becomes a colorless and transparent drawing board; By setting the layer to be one level higher than NSMainMenuWindowLevel, the NSPanel class is always displayed at the top of the screen; By setting properties, the watermark window supports full screen and multiple desktops; Instantiate an NSPanel object as the layer for drawing the screen watermark; Combined with the issued strategy, draw the watermark content on the Layer layer of NSPanel; The method further comprises: Custom type WaterPanel, inherited from NSPanel, and override the initWithContentRect method; Customize WaterView, inherit from NSView, and override the drawRect method to draw the watermark information; Initialize the WaterPanel object using the current screen size and add the screen watermark view to the WaterPanel; By parsing the policy issued by the background, the watermark style to be drawn is obtained, and the watermark is drawn through EstWatermarkView.

2. The method for displaying a screen watermark on a Mac system according to claim 1, characterized in that: By setting the collectionBehavior property of NSPanel, full screen and multi-desktop modes are supported; By setting the hasShadow and backgroundColor properties of NSPanel, the screen is made colorless and transparent without shadows; The watermark policy is obtained through the application server, and the watermark policy is used to determine whether to display the watermark and the style and content of the watermark display.

3. The method for displaying a screen watermark on a Mac system according to claim 2, wherein: After obtaining the watermark strategy, the watermark information is obtained by parsing, and the watermark is drawn using the watermark information, including: Obtain the strategy information watermarkInfo.onceInfo through network request; Obtain corresponding information through the policy information, the corresponding information including watermark direction direc, machine name machineName, address information addressInfo, custom content customContent, user information userInfo, current time currentDate, font fontName and font color rgbaValue; A screen watermark is drawn using the policy information.

4. The method for displaying a screen watermark on a Mac system according to claim 3, wherein: Drawing a screen watermark according to the policy information further includes: The character strings are concatenated, and the corresponding information is separated by line breaks; Use attributed strings to set the style of the string; Customize EstWatermarkTextLayer, inherit from CATextLayer, and draw the watermark information into EstWatermarkTextLayer.