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

Publisher: Window is not always on top #6107

Merged

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Jan 5, 2024

Changelog Description

Goal of this PR is to avoid using WindowStaysOnTopHint which causes issues, especially in cases when DCC shows a popup dialog that is behind the window, in that case both Publisher and DCC are frozen and there is nothing to do.

Additional info

This needed to change the Publisher window behavior. Publisher window does not inherit from QDialog but QWidget, this also resolved #5791 and replaces #5838 . To have option to show Publisher as separate window is also required to not use parent. To make sure the publisher is on top were added callbacks happening during publishing. On publish stop or after each processed instance and plugin is Publisher raised to the top, but otherwise can be put in back or minimized.

Notes

Argument parent is unused at this moment, and based on approval of this approach we can deprecate it (or keep it as reminder?).
I did test only Nuke and Maya where it worked, but not sure what will happen e.g. in Blender or Photoshop.

Testing notes:

Test publisher window behavior in different DCCs. This is more UX testing.

  1. Show publisher.
  2. Start publishing (e.g. validation).
  3. Reset publishing.
  4. Start publishing again and change focus to different window.

The behavior should not be worse than before.

@ynbot
Copy link
Contributor

ynbot commented Jan 5, 2024

Task linked: OP-7586 New Publisher window always on top?

@ynbot ynbot added type: enhancement Enhancements to existing functionality size/XS Denotes a PR changes 0-99 lines, ignoring general files labels Jan 5, 2024
@iLLiCiTiT iLLiCiTiT added sponsored Client endorsed or requested target: OpenPype target: AYON labels Jan 5, 2024
Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

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

It works in Houdini.

Animation_22

@BigRoy
Copy link
Collaborator

BigRoy commented Jan 8, 2024

@MustafaJafar can you confirm it does not pop-up in front of another application when you don't have houdini active but another application in front of it? (Like it does not activate houdini as you are typing in another app). As described here

We should have that added to the testing notes because that'd be unwanted behavior.

@MustafaJafar
Copy link
Contributor

@MustafaJafar can you confirm it does not pop-up in front of another application when you don't have houdini active but another application in front of it? (Like it does not activate houdini as you are typing in another app). As described here

We should have that added to the testing notes because that'd be unwanted behavior.

I'm not sure if I got it right.
original behavior from develop:
Animation_24

behavior from this PR:
Animation_23

@BigRoy
Copy link
Collaborator

BigRoy commented Jan 8, 2024

I'm not sure if I got it right.

  • Start a publish
  • Directly switch to e.g. Spotify.
  • Upon finish of the publish Houdini and the publisher UI should NOT pop-up and take focus over Spotify (or any other application you're working on). It should never steal focus if you're working in another application.

So basically, make Spotify active during the publish. It should remain in front, and in active focus.
Better even to test it with another app like "notepad" or alike and then as it's publishing in the background keep typing in notepad random words. It should never interrupt your typing.

Copy link
Member

@Minkiu Minkiu left a comment

Choose a reason for hiding this comment

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

Haven't tested it, but code wise looks good.

@simonebarbieri
Copy link
Member

simonebarbieri commented Jan 9, 2024

@iLLiCiTiT I'm testing this in Blender, and while it does not take the focus from other windows, like mentioned here, the publisher keeps taking the focus from the main Blender window while publishing, not only when the publishing stops. I'm not sure if that is intended or not! It doesn't stay on top when the publishing isn't running, though, unlike before.

Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

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

Did a quick test with Publisher in Photoshop and all seems ok.

UI stays during publishing below active application with focus kept.

PS_Publishing_Test.mp4

@iLLiCiTiT iLLiCiTiT merged commit adb7e19 into develop Jan 11, 2024
1 check passed
@ynbot ynbot added this to the next-patch milestone Jan 11, 2024
@iLLiCiTiT iLLiCiTiT deleted the enhancement/OP-7586_New-Publisher-window-always-on-top branch January 11, 2024 12:21
@BigRoy
Copy link
Collaborator

BigRoy commented Jan 24, 2024

This PR made it so that clicking e.g. the Maya window the Publisher UI will now drop to behind the Maya window, unlike the Loader, Manager, etc. which are parented to the host.

To me personally this is quite annoying. Also because now with say two Maya's open it makes it much harder to differentiate to which Maya it belongs plus it becomes its own taskbar entry you alt+tab to instead of belonging to e.g the specific maya entry.

This behavior change also makes it much worse to say select meshes in maya, and then create an instance with that selection, then select some other instances, and create another instances because the UI keeps disappearing to the back whilst doing that.

Can I flag this again to bring up maybe reverting this and looking for other options @iLLiCiTiT @mkolar @LiborBatek ?

BigRoy added a commit to BigRoy/OpenPype that referenced this pull request Jan 25, 2024
@LiborBatek
Copy link
Member

This PR made it so that clicking e.g. the Maya window the Publisher UI will now drop to behind the Maya window, unlike the Loader, Manager, etc. which are parented to the host.

To me personally this is quite annoying. Also because now with say two Maya's open it makes it much harder to differentiate to which Maya it belongs plus it becomes its own taskbar entry you alt+tab to instead of belonging to e.g the specific maya entry.

This behavior change also makes it much worse to say select meshes in maya, and then create an instance with that selection, then select some other instances, and create another instances because the UI keeps disappearing to the back whilst doing that.

@BigRoy I would say this being really subjective, someone likes it that way other dont, me personally dont have any preference between those two. So its more up to @mkolar to decide.

What annoys me more being the fact, that if Publisher already been opened (kept open but not on screen visible - minimised on taskbar etc) and you as user not being aware, then clicking the tool in the Ayon menu doesnt bring the UI infront/maximised to your eyes... thats really pain in the butt imho. Not sure if related to this PR tho.

@BigRoy
Copy link
Collaborator

BigRoy commented Jan 26, 2024

I would say this being really subjective, someone likes it that way other dont, me personally dont have any preference between those two. So its more up to @mkolar to decide.

Agreed. It's purely my personal pure hatred against it, haha. Just kidding - for now I've just reverted this particular change in our branch.

then clicking the tool in the Ayon menu doesnt bring the UI infront/maximised to your eyes... thats really pain in the butt imho. Not sure if related to this PR tho.

That does sound annoying. It does pop-up on our end when minimized. (Tested in Maya 2024; on Windows)

What it doesn't appear to do for me is: If I open the manager and the publisher, and the publisher is behind the manager then it does not "raise" it to the front to in front of the manager. That's something that would actually be nice to have it do as well.

Note that I tested this behavior in our branch where I reverted the code of the window to dialog and parented to the main window.

@LiborBatek
Copy link
Member

LiborBatek commented Jan 26, 2024

@BigRoy did quick testing and its working in recent OP branch which am running now (not checkout develop tho)

working in maya and blender but

...happening randomly in PS host app....so maybe you could check if present on yours in PS

and yes, that issue when opened Scne Inventory and Publisher together not changing focus/going to top is annoying and present

@BigRoy
Copy link
Collaborator

BigRoy commented Jan 26, 2024

...happening randomly in PS host app....so maybe you could check if present on yours in PS

Unfortunately not using Photoshop integration here myself. However, since there it isn't parented to a Qt interface I'm pretty sure it would behave quite similar on my end - even with the reverted changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR changes 0-99 lines, ignoring general files sponsored Client endorsed or requested target: AYON target: OpenPype type: enhancement Enhancements to existing functionality
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Bug: Pressing Enter in publisher unexpectedly pops up Help dialog
8 participants