Skip to content
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

Tab with unselected activity does not get highlighted #311

Open
urbanware-org opened this issue Jan 23, 2021 · 10 comments
Open

Tab with unselected activity does not get highlighted #311

urbanware-org opened this issue Jan 23, 2021 · 10 comments

Comments

@urbanware-org
Copy link

Here is something I recently experienced with various programs.

For example, let's assume I have a few text files and want to open them one after another with Gedit.

  1. Inside my file manager, I right-click the first one and open it using Gedit, which is not running.
  2. Gedit starts, has the focus and shows the content of the text file. So far, so good.
  3. Then, I switch back to my file manager, select the next file and open it the same way.
  4. The focus stays on the window of my file manager, I can see the Gedit tab title changes, but the tab does not get highlighted.
  5. When I switch to Gedit, both files are opened (as expected).

In the past (as far as I have noticed before migrating to Notion 4) the tab has been highlighted when Gedit was already running and another file was opened while it did not have the focus.

My Notion look does not seem to be the reason for this. I tried another looks with the same result.

I'm currently using Notion 4.0.2-1.

@buhl
Copy link
Collaborator

buhl commented Jan 23, 2021

Not sure if this helps. But could it have something to do with URGENT hints?

@urbanware-org
Copy link
Author

What exactly do you mean?

@buhl
Copy link
Collaborator

buhl commented Jan 23, 2021

I have something like this in my theme

de.defstyle("stdisp-statusbar", {
    de.substyle("activity", { 
        foreground_colour = "#eeeeee", 
        background_colour = "#901010",
    }),

})

de.defstyle("actnotify", {
    pos = "tl",
})

It will notify me when a window (not in focus) gets the urgency hint.
A test could be to run sleep 5 && echo -e "\a" in a terminal window and then remove focus from it.

@urbanware-org
Copy link
Author

Ah, I see.

I have something like this in my theme

I have some similar code inside mine:

de.defstyle("actnotify", {
    shadow_colour = "#00448d",
    highlight_colour = "#007cff",
    background_colour = "#005dc0",
    foreground_colour = "#ffffff",
})

A test could be to run sleep 5 && echo -e "\a" in a terminal window and then remove focus from it.

Thanks for the tip!

I executed that command inside a terminal and first it did not work. Then, I enabled the visual terminal bell (usually disabled) and retried. With that it works for the terminal.

Nevertheless, I'm wondering why it does not work with Gedit as well as other programs (where Gedit is the lesser problem).

As already mentioned it used to work before. 🤔

@buhl
Copy link
Collaborator

buhl commented Jan 23, 2021

I have never used gedit. Could it be that Gedit no longer set urgency when opening new files?
What version of notion did you migrate from?

@urbanware-org
Copy link
Author

I have never used gedit

I don't use it often, but it was the first time, I noticed that behavior.

Could it be that Gedit no longer set urgency when opening new files?

I think that's rather unlikely. As already mentioned, there are further programs affected. Gedit is just the simplest example.

When using virt-manager the problem is very annoying. I have multiple screens at work with multiple workspaces where the consoles ("screens") of multiple virtual machines are open. When I double-click at a virtual machine inside the virtual machine list, its "screen" opens. In the past, when I double-clicked a virtual machine, which was already running, Notion highlighted the tab and I could instantly see on which workspace of which screen the machine is located.

Also here, I currently have same behavior as with Gedit. So, if I double-click a virtual machine that is already open somewhere, nothing happens. I have to search for myself on which workspace on which screen it is located. This takes time and nerves.

What version of notion did you migrate from?

The last release I productively used was 3-2017050501 (later versions were running on experimental systems). However, I have not taken over my configuration one-by-one. I compared the old files with the new ones and adjusted those.

Everything with Notion works absolutely fine, except for this issue.

@buhl
Copy link
Collaborator

buhl commented Jan 24, 2021

Hmm, not sure I can help with this issue.
If you have the time you could try to go back to a commit where things worked as before. Then use git bisect to find a commit where it stops working.

But while you have this issue maybe the focus list menu could help you save some time and nerves?
The new bindings are META+o o and then you can type something unique to the window title and press enter.

@urbanware-org
Copy link
Author

First of all, thanks for your help. I really appreciate it.

If you have the time you could try to go back to a commit where things worked as before. Then use git bisect to find a commit where it stops working.

I will do so as soon as I find the time as this'll take a while to figure out, I guess.

But while you have this issue maybe the focus list menu could help you save some time and nerves?

Thanks for the tip! 👍

@buhl
Copy link
Collaborator

buhl commented Jan 24, 2021

@raboof at some point in notions history we had to remove/rewrite part of the code base due to licensing isues. Do you know what commit the code was removed/rewritten? Maybe @urbanware-org could try to go back just before the changes was made?

@raboof
Copy link
Owner

raboof commented Jan 24, 2021

For Notion 4, we took the version of Notion 3 at a point in time where it was still LGPL-licensed, and then 'skipped over' the part of the history that was Ion-licensed. Indeed some features that were added in the 'Ion license' era were lost, some were re-implemented again 'cleanly' on the Notion 4 branch.

I think looking at the history isn't going to help much here, even if we find the commit where this feature was added/broken we can probably not use it since it's Ion-licensed.

It might be worth checking if the problem also exists on Notion 4.0.0 (likely so), and in that case re-implement the feature from scratch in LGPL on Notion 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants