Skip to content

fixed obacity problems on linux #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

salaamdev
Copy link

Since using Ctrl + B on Linux distributions like Kubuntu didn't work as expected, I modified the configuration to completely hide the window when pressing Ctrl + B.

Copy link
Collaborator

@bhaumikmaan bhaumikmaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a thorough re-calibration in terms of breaking of other existing functionality. Please review and attach test proofs wherever necessary

@@ -0,0 +1 @@
- @azure Rule - Use Azure Best Practices: When generating code for Azure, running terminal commands for Azure, or performing operations related to Azure, invoke your `get_azure_best_practices` tool if available.c
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove, unnecessary change

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove, unnecessary change.
Added due to permission changes in linux

Comment on lines +389 to +393
// Linux-specific fix: Hide the window completely rather than just setting opacity
if (process.platform === 'linux') {
state.mainWindow.hide();
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is only for linux, where is the state.mainWindow.hide() for the other OS?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea is that on Linux we straight up hide the window, but Windows and Mac we just set opacity to 0, so no need to hide the window on non-Linux platforms.

Comment on lines +418 to +429
if (process.platform === 'linux') {
state.mainWindow.show();
state.mainWindow.focus();
// Set opacity after showing to ensure the window is visible
state.mainWindow.setOpacity(configHelper.getOpacity());
} else {
// Mac/Windows behavior
state.mainWindow.setOpacity(0); // Set opacity to 0 before showing
state.mainWindow.showInactive(); // Use showInactive instead of show+focus
state.mainWindow.setOpacity(1); // Then set opacity to 1 after showing
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is working for other OS?
Since you are tweaking the opacity not the window itself


// Linux-specific handling for opacity changes
if (process.platform === 'linux') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, streamlining the implementation for Linux OS still needs verification that it is not breaking other OS

@bhaumikmaan bhaumikmaan added the bug Something isn't working label Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants