How to prevent dialogs from getting too large?

Have a problem writing a FVWM function? Post your problem here, or post example functions that you think others' will enjoy.
feklee
Kitten
Kitten
Posts: 15
Joined: Sun Jan 07, 2007 2:43 pm

How to prevent dialogs from getting too large?

Postby feklee » Mon Mar 06, 2017 2:03 am

Since a recent update of GTK+ 3 on an Arch system, file dialogs open larger than the screen. The issue seems to be related to GDK_SCALE=2, but it worked before the update. See also my bug 779218 on bugzilla.gnome.org, with screenshot.

Now, as a workaround I specified in my hiwiwi configuration:

Code: Select all

+ I Current ("Open*|Save*|* file: ", Transient) ResizeMove 2200p 1400p 472p 79p

This does the trick, but only for transient windows that match the condition "Open*|Save*|* file: ".

I wonder: Is there a better, more general way to shrink windows that exceed screen dimensions?

thomasadam
Administrator
Administrator
Posts: 3040
Joined: Mon Nov 08, 2004 1:12 am
Location: England
Contact:

Re: How to prevent dialogs from getting too large?

Postby thomasadam » Mon Mar 06, 2017 2:29 am

MaxWindowSize

feklee
Kitten
Kitten
Posts: 15
Joined: Sun Jan 07, 2007 2:43 pm

Re: How to prevent dialogs from getting too large?

Postby feklee » Mon Mar 06, 2017 1:26 pm

thomasadam wrote:MaxWindowSize


Thanks for the suggestion, Adam! However, MaxWindowSize has a couple of disadvantages:
  1. I have windows that I position with ResizeMove, and they should be allowed to be larger than dialog windows. I would prefer to set a maximum default window size, i.e. a window size for new windows. New windows should then be allowed to be scaled up by the user or the machine.
  2. Setting MaxWindowSize doesn't prevent new windows from being positioned with their title bar outside of the screen, which is also a big usability issue.

Tronar
Cat in the hat
Cat in the hat
Posts: 30
Joined: Thu Jun 05, 2014 5:58 pm
Location: Moscow

Re: How to prevent dialogs from getting too large?

Postby Tronar » Mon Mar 06, 2017 7:33 pm

MaxWindowSize is a Style option, so you can customize it for every kind of window separately, using appropriate wildcards. As I have understood you, the problem shows up with the file dialog windows of the GTK3 (or GDK?) libraries. Try to "Identify" these Dialogs in different applications and tune your Style statements to cover them all.
If you see the title bar getting off screen, you just have the wrong coordinates.

feklee
Kitten
Kitten
Posts: 15
Joined: Sun Jan 07, 2007 2:43 pm

Re: How to prevent dialogs from getting too large?

Postby feklee » Mon Mar 06, 2017 8:28 pm

Tronar wrote:Try to "Identify" these Dialogs in different applications and tune your Style statements to cover them all.

Thanks for the suggestion. I still prefer the solution that I posted in my question, now a little bit extended:

Code: Select all

+ I Current ("Attach*|Open*|Save*|* file: ", Transient) ResizeMove 2200p 1400p 472p 79p

This just sets the initial size of the windows, and the user can increase the size if preferred. Also, the condition here allows matching against Transient.


Return to “Complex functions”

Who is online

Users browsing this forum: No registered users and 1 guest