mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
🎨
This commit is contained in:
parent
a34eaa3606
commit
b3dd09a0f2
@ -5,8 +5,8 @@ use crate::{
|
||||
};
|
||||
use cocoa::{
|
||||
appkit::{
|
||||
NSApplication, NSButton, NSSquareStatusItemLength, NSStatusBar, NSStatusItem, NSView,
|
||||
NSViewHeightSizable, NSViewWidthSizable, NSWindow,
|
||||
NSApplication, NSButton, NSEventMask, NSSquareStatusItemLength, NSStatusBar, NSStatusItem,
|
||||
NSView, NSViewHeightSizable, NSViewWidthSizable, NSWindow,
|
||||
},
|
||||
base::{id, nil, YES},
|
||||
foundation::{NSSize, NSUInteger},
|
||||
@ -32,9 +32,6 @@ use std::{
|
||||
static mut HANDLER_CLASS: *const Class = ptr::null();
|
||||
const STATE_IVAR: &str = "state";
|
||||
|
||||
#[allow(non_upper_case_globals)]
|
||||
const NSEventMaskAny: NSUInteger = NSUInteger::MAX;
|
||||
|
||||
#[ctor]
|
||||
unsafe fn build_classes() {
|
||||
HANDLER_CLASS = {
|
||||
@ -82,7 +79,7 @@ impl StatusItem {
|
||||
.set_ivar(STATE_IVAR, Weak::into_raw(state.clone()) as *const c_void);
|
||||
button.setTarget_(*event_handler);
|
||||
button.setAction_(sel!(handleEvent));
|
||||
let _: () = msg_send![button, sendActionOn: NSEventMaskAny];
|
||||
let _: () = msg_send![button, sendActionOn: NSEventMask::NSAnyEventMask];
|
||||
|
||||
RefCell::new(StatusItemState {
|
||||
native_item,
|
||||
|
Loading…
Reference in New Issue
Block a user