Skip to content

Commit

Permalink
Minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandbernard committed Jun 30, 2021
1 parent e01d693 commit 1cabb76
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ dist/
node_modules/
thumbs.db
.idea/
.vim/

todo.md
2 changes: 1 addition & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { app } from 'electron';
import { loadConfig } from './config';
import { initModules, deinitModules } from './executor';

app.commandLine.appendSwitch("disable-gpu"); // Transparancy will not work without this
app.commandLine.appendSwitch("disable-gpu"); // Transparency will not work without this

async function startApp() {
const got_single_instance_lock = app.requestSingleInstanceLock();
Expand Down
9 changes: 3 additions & 6 deletions src/main/modules/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ let tray;

let main_window;

const MAX_TRANSFER_LEN = 200; // Text in the results sent to the renderer will be croped to this length.
const MAX_TRANSFER_LEN = 200; // Text in the results sent to the renderer will be cropped to this length.

// This stores the original_options because we only send croped text fields.
// This stores the original_options because we only send cropped text fields.
// (Fixes a performance issue when the clipboard contains a very long text)
const original_option = new Map();

// This variable is used to ensure that if a earlier query finishes after a later query, it will not
// actualty sen the results to the renderer.
// actually sen the results to the renderer.
let execution_count = 0;

function sendUpdatedOptions(id, sender, results) {
Expand Down Expand Up @@ -92,9 +92,6 @@ export function createMainWindow() {
main_window.webContents.on('will-navigate', (e) => {
e.preventDefault();
});
main_window.webContents.on('new-window', (e) => {
e.preventDefault();
});
main_window.on('close', hideWindow);
if (!isDevelopment) {
main_window.on('blur', hideWindow);
Expand Down

0 comments on commit 1cabb76

Please sign in to comment.