Maximised window title border crop patch for XFWM

Show us how you are setting up MX
Post Reply
Message
Author
User avatar
AK-47
Developer
Posts: 1081
Joined: Sun Mar 24, 2019 7:04 pm

Maximised window title border crop patch for XFWM

#1 Post by AK-47 »

The most annoying thing I've encountered within XFCE so far is the way the top border is still shown when the window is maximised. This makes some themes look out-of-place.
Image

Patching your theme up
Just edit your theme's xfwm4/themerc and add frame_border_top=<X> to it somewhere. Replace the <X> with the number of pixels that is to be considered as the border on top of the frame of course, which will depend on your theme.

Code: Select all

echo "frame_border_top=<X>" >> /usr/share/themes/<theme-name>/xfwm4/themerc
This will not break existing themes, as the patched XFWM behaves as it used to without the frame_border_top setting.

Image
This feature will be available in XFCE 4.14.
Last edited by AK-47 on Sun Jun 30, 2019 7:38 pm, edited 7 times in total.

User avatar
dolphin_oracle
Developer
Posts: 20031
Joined: Sun Dec 16, 2007 1:17 pm

Re: Maximised window title border crop patch for XFWM

#2 Post by dolphin_oracle »

you should submit this to xfce if you haven't. its a great idea
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
AK-47
Developer
Posts: 1081
Joined: Sun Mar 24, 2019 7:04 pm

Re: Maximised window title border crop patch for XFWM

#3 Post by AK-47 »

dolphin_oracle wrote: Thu May 02, 2019 10:33 am you should submit this to xfce if you haven't. its a great idea
I submitted it but I'm not sure what the wait will be like. There are lots of other bugs with higher priorities over there.
Last edited by AK-47 on Tue May 21, 2019 10:46 pm, edited 1 time in total.

User avatar
Stevo
Developer
Posts: 12842
Joined: Fri Dec 15, 2006 8:07 pm

Re: Maximised window title border crop patch for XFWM

#4 Post by Stevo »

You can always set xfce to hide the titlebar on maximized windows, then you'll never see the top border at all! I use the wnck panel plugin to put the window buttons on the taskbar when maximized.

User avatar
Adrian
Developer
Posts: 8270
Joined: Wed Jul 12, 2006 1:42 am

Re: Maximised window title border crop patch for XFWM

#5 Post by Adrian »

Stevo wrote: Thu May 02, 2019 2:44 pm You can always set xfce to hide the titlebar on maximized windows, then you'll never see the top border at all! I use the wnck panel plugin to put the window buttons on the taskbar when maximized.
Yeah, but it's not the thing. Frankly I've never noticed this because my themes has the same color for the border as for the title so they blend and I cannot tell the border still shows up, maybe that's why Xfce developers haven't noticed this issue.

User avatar
Stevo
Developer
Posts: 12842
Joined: Fri Dec 15, 2006 8:07 pm

Re: Maximised window title border crop patch for XFWM

#6 Post by Stevo »

Adrian wrote: Thu May 02, 2019 2:59 pm
Stevo wrote: Thu May 02, 2019 2:44 pm You can always set xfce to hide the titlebar on maximized windows, then you'll never see the top border at all! I use the wnck panel plugin to put the window buttons on the taskbar when maximized.
Yeah, but it's not the thing. Frankly I've never noticed this because my themes has the same color for the border as for the title so they blend and I cannot tell the border still shows up, maybe that's why Xfce developers haven't noticed this issue.
Right, and maybe they're using those 1 pixel width themes. Hey, what does that invisible "Borders" WM theme we have look like?

User avatar
dreamer
Posts: 738
Joined: Sun Oct 15, 2017 11:34 am

Re: Maximised window title border crop patch for XFWM

#7 Post by dreamer »

I think the full window border showing maximized might be a Linux thing: Metacity/Marco/Emerald/xwfm etc. I had to boot into Windows 10 to take a look. It's true that the border doesn't show in Windows 10. But there is only one theme in Windows 10. Many xwfm themes might look odd with the patch you suggest, because they were made with the assumption that the full window border would be shown. The title text won't be centered anymore, but pushed up in those themes. The Windows 10 window border was designed to be cropped, xfwm themes weren't.

User avatar
AK-47
Developer
Posts: 1081
Joined: Sun Mar 24, 2019 7:04 pm

Re: Maximised window title border crop patch for XFWM

#8 Post by AK-47 »

dreamer wrote: Thu May 02, 2019 7:03 pm I think the full window border showing maximized might be a Linux thing: Metacity/Marco/Emerald/xwfm etc. I had to boot into Windows 10 to take a look. It's true that the border doesn't show in Windows 10. But there is only one theme in Windows 10. Many xwfm themes might look odd with the patch you suggest, because they were made with the assumption that the full window border would be shown. The title text won't be centered anymore, but pushed up in those themes. The Windows 10 window border was designed to be cropped, xfwm themes weren't.
I took exactly that into account with the patch, and existing themes will not break as a result of it.
I suggest reading the first post and also the Bugzilla link for an example. In order for a theme to be affected by the patch, the developer of the theme would have to add a "frame_border_top" property. This tells XFWM how much of the top of the frame constitutes the border, and therefore how much to chop off the top. If this property isn't present in the theme, XFWM will use 0 as the default, and so 0 pixels will be cropped the top off when maximised, so I don't see how those themes would look weird at all. They'll look exactly the same as they did before the patch.

User avatar
dreamer
Posts: 738
Joined: Sun Oct 15, 2017 11:34 am

Re: Maximised window title border crop patch for XFWM

#9 Post by dreamer »

AK-47 wrote: Fri May 03, 2019 5:15 am I took exactly that into account with the patch, and existing themes will not break as a result of it.
I suggest reading the first post and also the Bugzilla link for an example. In order for a theme to be affected by the patch, the developer of the theme would have to add a "frame_border_top" property. This tells XFWM how much of the top of the frame constitutes the border, and therefore how much to chop off the top. If this property isn't present in the theme, XFWM will use 0 as the default, and so 0 pixels will be cropped the top off when maximised, so I don't see how those themes would look weird at all. They'll look exactly the same as they did before the patch.
Cool. I like new functionality when it doesn't break existing things. I didn't see this sentence:
This will not break existing themes, as the patched XFWM behaves as it used to without the frame_border_top setting. It's silently ignored by the unpatched XFWM.

Post Reply

Return to “Themes and Screenshots”