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

drawinTitleBar requirement #6

Open
Mitusin opened this issue Nov 16, 2019 · 5 comments · May be fixed by #10
Open

drawinTitleBar requirement #6

Mitusin opened this issue Nov 16, 2019 · 5 comments · May be fixed by #10
Labels
help wanted Extra attention is needed

Comments

@Mitusin
Copy link

Mitusin commented Nov 16, 2019

The program works flawless if the mail.tabs.drawintitlebar is set to false, which is not the default value. I have been trying to fix it to work with the default value, which I prefer, but I have not been able to capture the close messages :-(
It seems the program hooks to the right window and it keeps receiving messages. In fact, I was able to capture clicks on the caption (HTCAPTION) but hitting the X button is not detected.

I think it would really nice to modify the code to work when mail.tabs.drawintitlebar is set to true.

@sagamusix
Copy link
Owner

To re-iterate my introduction of this tool in the mintrayr issue tracker:

I wrote this tool for myself to fix exactly the issue I was having. If it's useful to you as well, that's great! But please don't report any suggestions on how to improve it. Besides having a day job in software development I already maintain enough other open-source software that I have zero intention on spending any more work on TBTray apart from fixing serious bugs if any show up. Feel free to fork it and incorporate any changes you want, though.

That is: If you can find a way to solve the problem, please submit a pull request. But don't expect me to spend hours on debugging a feature I personally don't use. If you want to give it a try, I would suggest trying to subclass the window like mintrayr did, my approach is different and maybe that explains why it doesn't work.

@sagamusix sagamusix added the help wanted Extra attention is needed label Nov 16, 2019
@TheGuardianWolf
Copy link

TheGuardianWolf commented Nov 22, 2019

I've solved this but with my own application using the UI Automation API. However, the specific problem you are trying to tackle (minimise on close) I have not implemented. This is because there is an add-on that does this (Minimise on Close).

Having a brief look through the UI Automation docs reveals that WindowClosed event or a Invoke event could possibly detect the click on close button, but unlike this application, it will not intercept the message. It's was therefore cleaner to not implement it and leave it to the user to install an add-on.

If you would like to fix this, have a look at what I have done, you can accomplish the task with .NET APIs without dll injections.

https://github.com/TheGuardianWolf/ThunderbirdTray/blob/master/lib/TrayBird.cs

@dougbreaux
Copy link

FYI, I just discovered that disabling the "Show Title Bar" option in Customize also causes the same behavior. I'm not complaining, just observing.

@sk-1982 sk-1982 linked a pull request Feb 20, 2020 that will close this issue
@marcooosd
Copy link

@sagamusix just wanted to say thank you so much for this. And thank you for the detailed installation instructions as well. You're a legend!

@exspool
Copy link

exspool commented Apr 23, 2021

Good!! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants