"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/lib/window.ts" between
tabby-1.0.181.tar.gz and tabby-1.0.183.tar.gz

About: Tabby is a modern cross-platform terminal emulator, SSH and serial client.

window.ts  (tabby-1.0.181):window.ts  (tabby-1.0.183)
import * as glasstron from 'glasstron' import * as glasstron from 'glasstron'
import { Subject, Observable, debounceTime } from 'rxjs' import { Subject, Observable, debounceTime } from 'rxjs'
import { BrowserWindow, app, ipcMain, Rectangle, Menu, screen, BrowserWindowCons tructorOptions, TouchBar, nativeImage } from 'electron' import { BrowserWindow, app, ipcMain, Rectangle, Menu, screen, BrowserWindowCons tructorOptions, TouchBar, nativeImage, WebContents } from 'electron'
import ElectronConfig = require('electron-config') import ElectronConfig = require('electron-config')
import { enable as enableRemote } from '@electron/remote/main' import { enable as enableRemote } from '@electron/remote/main'
import * as os from 'os' import * as os from 'os'
import * as path from 'path' import * as path from 'path'
import macOSRelease from 'macos-release' import macOSRelease from 'macos-release'
import { compare as compareVersions } from 'compare-versions' import { compare as compareVersions } from 'compare-versions'
import type { Application } from './app' import type { Application } from './app'
import { parseArgs } from './cli' import { parseArgs } from './cli'
skipping to change at line 36 skipping to change at line 36
abstract setBlur (_: boolean) abstract setBlur (_: boolean)
} }
const macOSVibrancyType = process.platform === 'darwin' ? compareVersions(macOSR elease().version || '0.0', '10.14', '>=') ? 'under-window' : 'dark' : null const macOSVibrancyType = process.platform === 'darwin' ? compareVersions(macOSR elease().version || '0.0', '10.14', '>=') ? 'under-window' : 'dark' : null
const activityIcon = nativeImage.createFromPath(`${app.getAppPath()}/assets/acti vity.png`) const activityIcon = nativeImage.createFromPath(`${app.getAppPath()}/assets/acti vity.png`)
export class Window { export class Window {
ready: Promise<void> ready: Promise<void>
isMainWindow = false isMainWindow = false
webContents: WebContents
private visible = new Subject<boolean>() private visible = new Subject<boolean>()
private closed = new Subject<void>() private closed = new Subject<void>()
private window?: GlasstronWindow private window?: GlasstronWindow
private windowConfig: ElectronConfig private windowConfig: ElectronConfig
private windowBounds?: Rectangle private windowBounds?: Rectangle
private closing = false private closing = false
private lastVibrancy: { enabled: boolean, type?: string } | null = null private lastVibrancy: { enabled: boolean, type?: string } | null = null
private disableVibrancyWhileDragging = false private disableVibrancyWhileDragging = false
private touchBarControl: any private touchBarControl: any
private isFluentVibrancy = false private isFluentVibrancy = false
skipping to change at line 105 skipping to change at line 106
bwOptions.titleBarStyle = 'hidden' bwOptions.titleBarStyle = 'hidden'
} }
} }
if (process.platform === 'darwin') { if (process.platform === 'darwin') {
this.window = new BrowserWindow(bwOptions) as GlasstronWindow this.window = new BrowserWindow(bwOptions) as GlasstronWindow
} else { } else {
this.window = new glasstron.BrowserWindow(bwOptions) this.window = new glasstron.BrowserWindow(bwOptions)
} }
this.webContents = this.window.webContents
this.window.once('ready-to-show', () => { this.window.once('ready-to-show', () => {
if (process.platform === 'darwin') { if (process.platform === 'darwin') {
this.window.setVibrancy(macOSVibrancyType) this.window.setVibrancy(macOSVibrancyType)
} else if (process.platform === 'win32' && (this.configStore.appeara nce || {}).vibrancy) { } else if (process.platform === 'win32' && (this.configStore.appeara nce || {}).vibrancy) {
this.setVibrancy(true) this.setVibrancy(true)
} }
if (!options.hidden) { if (!options.hidden) {
if (maximized) { if (maximized) {
this.window.maximize() this.window.maximize()
 End of changes. 3 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)