Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-01-02 16:01:40

SirSkorpan
Member
Registered: 2019-01-02
Posts: 2

How to change size of 'non-resizable' windows?

I'm running Arch with xfce4 (with xfwm4) on a raspberry pi with the 7" 800x480 touchscreen. I've noticed that several of the settings windows will be too high for the screen, as in the height of the window is greater than 480px. Additionally, some of these windows are not resizable, for example "Application > Settings > Desktop" and "Application > Settings > Appearance". Is it possible to configure the window manager to never open a window larger than the resolution of the screen? Either globally for all windows/applications or for specific applications/windows as I come across them?

I tried adding a config file:

$ cat ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-appearance-settings.xml
<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfce4-appearance-settings" version="1.0">
  <property name="last" type="empty">
    <property name="window-width" type="int" value="250"/>
    <property name="window-height" type="int" value="380"/>
  </property>
</channel>
$ reboot

Mimicking the config files for e.g. xfce4-settings-editor, but this didn't have any effect. I'm guessing the /last/window-{height,width} properties only work for resizable windows. Is there something similar for the other settings windows/applications?

Last edited by SirSkorpan (2019-01-02 16:02:19)

Offline

#2 2019-01-02 21:03:11

Misko_2083
Member
Registered: 2015-10-13
Posts: 211
Website

Re: How to change size of 'non-resizable' windows?

Window size is set internaly into apllications. Some can bve resized up to a point, some are fixed width/height.

Information about window size is stored in the Xwindow property  called WM_NORMAL_HINTS.
Window manager must honor those specifications. https://specifications.freedesktop.org/ … l#NORESIZE

There is a way to make windows resizable because Xorg allows almost anything.

So if WM_NORMAL_HINTS are removed window will become resizable.
You can run next command in terminal, and when + appears click on non-resizable window.

xprop -remove WM_NORMAL_HINTS

After that you can resize the window.

You can also make a wrapper script for you application to resize the window automaticaly.
xdotool is required to resize the window.

#!/bin/bash

xfce4-appearance-settings & APP_PID=$!

# Sleep until the window is open
until xdotool search --onlyvisible --pid $APP_PID >/dev/null 2>&1; do
     sleep 1
done

# Gets window id fro process id
WIN=$(xdotool search --onlyvisible --pid $APP_PID | tail -n 1)

# Removes WM_NORMAL_HINTS X window property
xprop -remove WM_NORMAL_HINTS -id $WIN

# Resize to
xdotool windowsize --sync $WIN 200 400

However, notice that some window elements (widgets) are not going to be viewable if the window is resized.

This is because the applications are not desinged to run on small screen resolutions.
If they were they would have a scrolled window container which would allow the user to scroll inside the window.
https://developer.gnome.org/gtk3/stable … indow.html

One of the option for you is to use the display panning.
You can switch to a virtual screnn that is bigger than your monitor's resolution and use the mouse movement to view the the parts of the virtual screen.
Have a look in this thread:
https://www.linuxliteos.com/forums/tuto … 1/#msg3601


Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

#3 2019-01-02 22:36:03

SirSkorpan
Member
Registered: 2019-01-02
Posts: 2

Re: How to change size of 'non-resizable' windows?

Thank you for clearing things up!

Misko_2083 wrote:

However, notice that some window elements (widgets) are not going to be viewable if the window is resized.

This is because the applications are not desinged to run on small screen resolutions.

I was afraid of this, I suppose there is nothing to do about that sad For windows where the content was scrollable the script and xprop worked perfectly.

Panning might be a last resort, but I hope to avoid it if possible.

Are the settings-applications (like the ones I mentioned above, Desktop and Appearance) provided by the window manager, the desktop environment or the OS? Perhaps I could switch to sawfish or Awesome as window managers? I'm having little hope for this as most of the windows' WM_CLASS seem to reference xfce4 rather than xfwm4, but better to try to confirm than to guess.

Offline

#4 2019-01-03 00:21:26

mint4all
Member
From: off the map
Registered: 2018-08-21
Posts: 276

Re: How to change size of 'non-resizable' windows?

Greetings!

Afaik, xfce offers a simple (admittedly clumsy) workaround: by keeping the alt-key depressed, any oversized window can be dragged (panned?) by depressing at the same time a mouse's left-key (think drag-n-drop)  to a new, partially-offscreen position thus making visible those items that don't fit on your screen before. Worth a try? Btw: the key that makes your windows draggable is also configurable so as to minimize key-press conflicts.

Cheers, m4a


Linux Mint 21.3 -- xfce 4.18 ... Apple iMAC -- Lenovo, Dell, HP Desktops and Laptops -- Family & Community Support

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 535.49 KiB (Peak: 536.34 KiB) ]