-
Notifications
You must be signed in to change notification settings - Fork 230
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
Allow placing Taskbar and MenuBar on secondary monitor #738
base: master
Are you sure you want to change the base?
Conversation
Thanks! While I understand setting primary taskbar could be beneficial, what does changing the primary menu bar enable (or do you have future ideas)? Also, for the settings interface, do you have a plan for making the setting intuitive? |
@dremin re: menu bar, I imagine they'd go together most of the time (that's what I personally did locally) so at least a shared setting is useful, but it is also conceivable why one would want them on different screens. Oh, I just realized you did not realize the setting is mostly for the scenario where taskbar and menu bar are not to be displayed on all displays. E.g. I have a big central monitor where I game, and I need the taskbar and menubar off it so that they are fully accessible when a game is running. Same for fullscreen videos. Many games don't have a way to select a monitor, and always display on the one Windows considers primary. re: intuitive setting, I was thinking to have a selector that looks like the Windows displays layout window. e.g. |
@dremin do you want me to make the UI before this goes in? I was planning individual PRs. |
I'm OK with the UI coming in a separate PR if the temporary UI is removed first. |
5bfe393
to
c337630
Compare
@dremin I am curious if there's a reason no to use latest C# (10.0)? |
c337630
to
7e2bb96
Compare
Cairo still targets .NET Framework 4.7.1, which I don't believe supports the latest C# versions. |
@dremin language version has only a little to do with the target framework. As long as you don't need it to be buildable with old msbuild and compiler (which I believe it is not, as it is using .NET SDK project format), you can set |
I develop some applications targeting .NET 2.0/4.0, but I can still use most of the features of C# 10, there should be no issue by using |
In that case, feel free to enable the new version! |
97f04c2
to
d09433a
Compare
@dremin added UI, enabled C# 10, and slightly cleaned code up. |
Do you think this pull request needs more work? |
Sorry it's taken me so long to get to this! Overall it looks good, but I ran into an issue: if the selected monitor is removed, the [menu bar/taskbar] is gone forever, even after the monitor is reconnected (of course, it works correctly when reconnecting the monitor before starting Cairo again). Ideally, the window would be re-opened on the primary display when the preferred one is removed, and back to the preferred once it is reconnected. The settings UI should also handle this other than showing no option selected (maybe a selected-but-inactive-looking state). I also think we can make the UI a bit easier to understand:
I also think we can improve the appearance of the displays in the UI but that doesn't need to happen before merging this (and is something I'm happy to play with as well). One thing I'm concerned about is this has pushed the settings UI height to a size that is no longer possible to use properly on a 720p display. |
NOTE: I renamed
IMenuBar.GetIsPrimaryDisplay
toIMenuBar.GetIsMainMenuBar
to better match semantic of the new behavior.Did not make a descent UI for the new setting yet, for now can be tested by going into
Advanced
and setting the firstTime format
(which actually points to the new setting) to something likePos=-700,800
(requires restart). which would then treat monitor at those coordinates as primary for the purpose of Taskbar and MenuBar placement. If there are no monitors at those coordinates, system primary monitor is used. To revert back, set the setting toPrimary
.