Add BrowserWindow.setAutoHideCursor for macOS
The `disableAutoHideCursor` BrowserWindow option can be used to control auto-hiding behavior when the window is created. This new API is needed to dynamically change the behavior after the fact.
This commit is contained in:
		
					parent
					
						
							
								fb74f5576d
							
						
					
				
			
			
				commit
				
					
						18c49285a8
					
				
			
		
					 8 changed files with 45 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -506,6 +506,23 @@ describe('browser-window module', function () {
 | 
			
		|||
    })
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
  describe('BrowserWindow.setAutoHideCursor(autoHide)', () => {
 | 
			
		||||
    if (process.platform !== 'darwin') {
 | 
			
		||||
      it('is not available on non-macOS platforms', () => {
 | 
			
		||||
        assert.ok(!w.setAutoHideCursor)
 | 
			
		||||
      })
 | 
			
		||||
 | 
			
		||||
      return
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    it('allows changing cursor auto-hiding', () => {
 | 
			
		||||
      assert.doesNotThrow(() => {
 | 
			
		||||
        w.setAutoHideCursor(false)
 | 
			
		||||
        w.setAutoHideCursor(true)
 | 
			
		||||
      })
 | 
			
		||||
    })
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
  describe('BrowserWindow.setVibrancy(type)', function () {
 | 
			
		||||
    it('allows setting, changing, and removing the vibrancy', function () {
 | 
			
		||||
      assert.doesNotThrow(function () {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue