Problems with H19 window (maximize, full-screen)

   5283   16   1
User Avatar
Member
464 posts
Joined: 8月 2014
Offline
Since H19, I have problems maximizing Houdini's window and restoring its size after it has been maximized. I did not have such issues on H18.5 and older versions.

Sometimes maximization does work, sometimes it doesn't. What I have managed to figure out is that:
  • If I start Houdini with window size smaller than display dimensions, I can maximize it. However after this, I can no longer restore its unmaximized size, and if I resize it down manually, maximization will no longer work in that session. Hitting maximize button, invoking maximization from window's menu, keyboard shortcut corresponding to this action, double-clicking the title bar --- none of them will have any effect on H19 window. I have to resort to manual resizing it.
  • If I start Houdini with a maximized window, I am able to maximize and restore its size without problems for the whole duration of the session.

Toggling full screen does not work at all, which is a pity because I always work full-screen.

What makes things worse, is that if I turn off my DisplayPort monitors, and turn them back on, Houdini's window is resized to tiny dimensions, and I cannot resize it back (even manually by dragging edges of window decoration) without restarting the program.

Is this a known problem? Do any of you guys also happen to experience it?

I'm running Houdini on Debian Bookworm with XFCE 4.16.
User Avatar
Member
4495 posts
Joined: 2月 2012
Offline
Hi,

I use fullscreen exclusively with my extension:



I used to have some display issues with Qt fullscreen feature also. Unfortunately it seems to be a hit or miss depending on the hardware and OS used. Before in fullscreen mode the entire screen would blank out.

But now on Windows 10 and CentOS, I don't have any of these issues on my ASUS laptop. So not sure if H19 also improved on this. I know dragging nodes onto parameters used to have an offset in screen space to make it work, but now in H19 no need.

The only issue is the popup menus, and menu highlighting has the offset issue. I probably should report this maybe SESI might fix it.

Otherwise Qt fullscreen is not officially supported in Houdini.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
464 posts
Joined: 8月 2014
Offline
Interesting extension. I need to check it out one day.

The only issue is the popup menus, and menu highlighting has the offset issue.
I had experienced this offset in 18.x, but only while working with two or more full-screen Houdini windows, one of which was on the 2nd display. In order to prevent it from happening I had to keep that window at any size but full-screen. Took me a while to figure it out. I think the main program window could be left on full-screen.

But now on Windows 10 and CentOS, I don't have any of these issues on my ASUS laptop. So not sure if H19 also improved on this.
Lucky you. On my machine H19 completely broke the full-screen mode. Or almost, because I found a workaround just a moment ago. For some peculiar reason while Houdini prevents xfwm4 from toggling full-screen mode on its (Houdini's) windows, I was able to circumvent this with wmctrl. The script below will toggle full-screen on currently focused window:

#!/bin/sh
# Toggle fullscreen mode of the focused window.
title=$(xdotool getwindowfocus getwindowname)
identity=$(wmctrl -l | grep "$title" | awk '{ print $1 }')
wmctrl -i -r "$identity" -b toggle,fullscreen

Why wmctrl works, but not full-screen mode invoked with WM hotkeys or from window's menu? I don't know.

There are some other strange problems with H19 that are related to the UI, like CTRL+SUPER (pressed and held in that order) invoking "Save As" dialog, or a brief pause when dragging a parameter or a node over another parameter (to create a reference copy), although I think the first time I noticed the latter was in H18.5.
Edited by ajz3d - 2022年1月18日 13:20:13
User Avatar
Member
4495 posts
Joined: 2月 2012
Offline
I assume SESI is making some assumptions about the starting position of the Qt main application but doesn't account fullscreen mode or doesn't use a method that accounts for this.

Because the same offset is present in the reported network editor current mouse position by the network editor API, so it wrongly reports the current mouse position, therefore affecting my select/display nearest node functions.

I don't want to hard code some value but might have to figure out some generic way to account for this if SESI won't support Qt fullscreen mode.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
464 posts
Joined: 8月 2014
Offline
You're right. In some way several types of UI elements (or returned mouse pointer coordinates) are not accounting for the display state of the title bar. It seems it is assumed that the title bar is always present.

I tested full-screen some more with the script, and the offset is there. It's in all standard menus, even with only one Houdini window in full-screen.

If I configure window manager to hide titles of all maximized windows (to simulate full-screen mode), then the offset manifests itself not only in menus, but also as a gap between bottom edge of the window and the border of my screen.

See: first attachment (houdini-wm-hide-title.png)
(Red rectangles are identical in size, and their height is equal to the height of the hidden title bar.)

It appears those menus are shifted down exactly by the height of a hidden title bar. If you want to compensate for this using an arbitrary number, then this might be a good starting point.

See: second attachment (houdini-fullscreen-offset.png)
(Greenish window is a reference to prove that the offset is equal to the vertical height of the title bar.)

Interestingly enough, while standard menus do suffer from this problem, not all RMB context menus are affected. Those from the network editor appear to be fine (including the TAB menu). Those from the viewport are on the other hand practically unusable, because they are displayed with an offset from the pointer, and will disappear even on a slight mouse movement.
Edited by ajz3d - 2022年1月18日 10:57:41

Attachments:
houdini-wm-hide-title.png (118.8 KB)
houdini-fullscreen-offset.png (65.1 KB)

User Avatar
Member
4495 posts
Joined: 2月 2012
Offline
This is what i suspected as well. The problem is to get that value programmatically and even then i can only fix the offset in the network editor coordinates but not the ones in the popup menu or highlighting.

I think this should be trivial for SESI to fix so I hope they do it.

Fullscreen is a must for immersive experience but also to maximize screen estate. So many people are using houdini on a laptop.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
animatrix_
Fullscreen is a must for immersive experience but also to maximize screen estate. So many people are using houdini on a laptop.

yes indeed.
Vertical Resolution availability is even more critical in Houdini, which uses a top-down network (instead of left-right, like TD)

Would be nice also to have a hotkey for the Toggle Stowbars action. I would use it continually.
Edited by Andr - 2022年1月18日 12:19:34
User Avatar
Member
4495 posts
Joined: 2月 2012
Offline
I created a hotkey for it, it's available in Python HOM:

def fullscreenSession():
    window = hou.qt.mainWindow()
    if window.isFullScreen():
        window.showNormal()
    else:
        window.showFullScreen()

    hou.ui.setHideAllMinimizedStowbars(window.isFullScreen())


In my custom UI there is a lot of thought went into this for things like hiding the main menu bar also, because only few options are really used for me anyways. So in those cases, I either assigned them hotkeys or created better replacement for Recent Files as a stand alone tool. This is also easier to use with tablets.

But there are way more UX that can be added. It takes a lot of time.

Even apps like 3ds max has an expert mode that sort of does this, so there is a lot of use for this sort of optimization IMO.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
464 posts
Joined: 8月 2014
Offline
animatrix_
This is what i suspected as well. The problem is to get that value programmatically and even then i can only fix the offset in the network editor coordinates but not the ones in the popup menu or highlighting.

I think this should be trivial for SESI to fix so I hope they do it.

Fullscreen is a must for immersive experience but also to maximize screen estate. So many people are using houdini on a laptop.
I agree, SideFX should really look into this issue.
Was it already reported?

Meanwhile, I was thinking about a temporary fix.
If only I could figure out which X window property is responsible for title bar height of a window, perhaps I could set it to some low number like 1 or 0, and see if a title bar of that height still generates an offset.

I already tried _NET_WM_ICON_GEOMETRY and _NET_FRAME_EXTENTS, but changing them with xprop didn't really have any effect on anything in the window.

---
Okay, while writing this post I found X window manager specification.
https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html [specifications.freedesktop.org]
I'll look into it and see if I can come up with any kind of solution. Might be impossible, but who knows.
User Avatar
Member
464 posts
Joined: 8月 2014
Offline
animatrix_
I created a hotkey for it, it's available in Python HOM:
def fullscreenSession():
    window = hou.qt.mainWindow()
    if window.isFullScreen():
        window.showNormal()
    else:
        window.showFullScreen()

    hou.ui.setHideAllMinimizedStowbars(window.isFullScreen())
Nice!

It behaves funny though. When I run it for the first time, Houdini enters full-screen, but leaves that gap at the bottom of its window. If I run it again to restore the window, and hit it one more time, I get the correct full-screen mode (without the gap).

Next time I exit full-screen and run the script again, the process repeats. First the gap, then it's ok. This sequence repeats every time.

Of course, it's not the script's fault.
Edited by ajz3d - 2022年1月18日 13:52:02
User Avatar
Member
4495 posts
Joined: 2月 2012
Offline
ajz3d
animatrix_
This is what i suspected as well. The problem is to get that value programmatically and even then i can only fix the offset in the network editor coordinates but not the ones in the popup menu or highlighting.

I think this should be trivial for SESI to fix so I hope they do it.

Fullscreen is a must for immersive experience but also to maximize screen estate. So many people are using houdini on a laptop.
I agree, SideFX should really look into this issue.
Was it already reported?

Meanwhile, I was thinking about a temporary fix.
If only I could figure out which X window property is responsible for title bar height of a window, perhaps I could set it to some low number like 1 or 0, and see if a title bar of that height still generates an offset.

I already tried _NET_WM_ICON_GEOMETRY and _NET_FRAME_EXTENTS, but changing them with xprop didn't really have any effect on anything in the window.

---
Okay, while writing this post I found X window manager specification.
https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html [specifications.freedesktop.org]
I'll look into it and see if I can come up with any kind of solution. Might be impossible, but who knows.

I reported it but don't remember this particular bug ID, so please feel free to report it yourself also.

ajz3d
animatrix_
I created a hotkey for it, it's available in Python HOM:
def fullscreenSession():
    window = hou.qt.mainWindow()
    if window.isFullScreen():
        window.showNormal()
    else:
        window.showFullScreen()

    hou.ui.setHideAllMinimizedStowbars(window.isFullScreen())
Nice!

It behaves funny though. When I run it for the first time, Houdini enters full-screen, but leaves that gap at the bottom of its window. If I run it again to restore the window, and hit it one more time, I get the correct full-screen mode (without the gap).

Next time I exit full-screen and run the script again, the process repeats. First the gap, then it's ok. This sequence repeats every time.

Of course, it's not the script's fault.

That's strange I don't have that issue also. One issue is calling this on Houdini start up using Python timer, sometimes it freezes the app so I have to manually invoke it to be safe after the UI is initialized.

I was using a timer to trigger it after 4 seconds but sometimes i hangs.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
464 posts
Joined: 8月 2014
Offline
animatrix_
That's strange I don't have that issue also. One issue is calling this on Houdini start up using Python timer, sometimes it freezes the app so I have to manually invoke it to be safe after the UI is initialized.

I was using a timer to trigger it after 4 seconds but sometimes i hangs.
I put your script on a shelf and invoked it from there, but it shouldn't make a difference.
Like I said, it's not your script's fault.

It's just something about how Houdini handles full-screen windows is plain wrong. It's the ONLY application that I have installed on my workstation that fights my window manager. Perhaps I should get rid of WM altogether and just simply turn to Suckless' dwm or i3. They both don't use window decorations (this includes those damn title bars), so maybe they would make those offset problems disappear? I'm already using the latter on my lappy, but the machine has too low spec to launch Houdini*, so I use it mostly for light activities.

* To be frank, I didn't even try...
User Avatar
Member
4495 posts
Joined: 2月 2012
Offline
Yes that seems strange. I found this value that might be useful:
hou.qt.mainWindow().style().pixelMetric(QtWidgets.QStyle.PM_TitleBarHeight)

But there is no way to offset the popup menus shown by Houdini AFAIK.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
21 posts
Joined: 12月 2008
Offline
...or use a tiling window manager instead of XFCE, it's always fullscreen.
User Avatar
Member
464 posts
Joined: 8月 2014
Offline
Finally, I found a way of removing window decorations, which while not completely free of issues, works on, let's say, a level that is acceptable to me.

I'm using devilspie to strip Houdini of window decorations before it fully loads its interface. This seems to get rid of those offsets in popups and menus. The only time I saw offsets is while dragging parameters from one floating window to another (e.g., when dragging a parameter from parameter editor to Type Properties floating window). It doesn't happen all the time though, so I can live with this. The other quirk that may be problematic to some, is that floating windows spawned by Houdini will also be undecorated, so to move, scale or close them, I need to use window manager shortcuts. But I use them all the time anyway, so it's not a big issue. Also, devilspie must be running in the background before Houdini starts, so I added it to the list of programs launched at startup.

The rule for undecorating Houdini that works with devilspie (0.23-2+b1) is:
(if (is (application_name) "Houdini FX") (undecorate))

In the config above I'm using WM_CLASSattribute, and it's always set to "Houdini FX" for all windows. However, seeing that floating windows always appear to have a "panel#" suffix in their WM_NAME, I think it should be possible to use this attribute instead. This would allow for detecting (with regex) if a given window is Houdini's parent window, which should remain undecorated, or is a spawned child. Keeping decorations on spawned windows might get rid of most drawbacks mentioned above. If not all.
User Avatar
Member
464 posts
Joined: 8月 2014
Offline
Ok, I moved to devilspie2 because of Lua support. If anyone is interested, the script below tells the program to undecorate only the main Houdini Indie window. It will leave its child windows decorated, so they can be freely moved, scaled and closed with just a mouse.
if(string.match(get_window_name(), ".+ Houdini Indie Limited%-Commercial %d+%.%d+%.%d+ %- Python 3") ~= nil) then
   undecorate_window()
end
It needs to be placed in $XDG_CONFIG_HOME/devilspie2/. So far I only gave it a short test, but did not notice any offset when dragging stuff between main and child windows, so hopefully this issue is gone.

Of course, for Houdini versions other than Indie, the match() pattern must be modified appropriately. Here's a good match() function reference:
https://riptutorial.com/lua/example/20315/lua-pattern-matching [riptutorial.com]

Finally, I can enjoy Houdini in fullscreen.
Edited by ajz3d - 2022年5月5日 15:58:37
User Avatar
Member
3 posts
Joined: 3月 2023
Offline
animatrix_
Hi,

I use fullscreen exclusively with my extension:



I used to have some display issues with Qt fullscreen feature also. Unfortunately it seems to be a hit or miss depending on the hardware and OS used. Before in fullscreen mode the entire screen would blank out.

But now on Windows 10 and CentOS, I don't have any of these issues on my ASUS laptop. So not sure if H19 also improved on this. I know dragging nodes onto parameters used to have an offset in screen space to make it work, but now in H19 no need.

The only issue is the popup menus, and menu highlighting has the offset issue. I probably should report this maybe SESI might fix it.

Otherwise Qt fullscreen is not officially supported in Houdini.

Hi, sorry, I noticed how in your video the node system appears translucent on top of the geometry. How do you do that?

Thank you so much.
  • Quick Links