Welcome!

The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Maximised window title border crop patch for XFWM

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

Maximised window title border crop patch for XFWM

#1

Post by AK-47 » Thu May 02, 2019 10:20 am

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.
You do not have the required permissions to view the files attached to this post.
Last edited by AK-47 on Sun Jun 30, 2019 7:38 pm, edited 7 times in total.
MX Linux 18.3 - Panasonic CF-30 - 3GB RAM - 160GB HDD - Core 2 Duo

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

Re: Maximised window title border crop patch for XFWM

#2

Post by dolphin_oracle » Thu May 02, 2019 10:33 am

you should submit this to xfce if you haven't. its a great idea
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad T530 - MX-18.3
lenovo s21e - antiX-19 beta 2 (live-USB)
FYI: mx "test" repo is not the same thing as debian testing repo.

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

Re: Maximised window title border crop patch for XFWM

#3

Post by AK-47 » Thu May 02, 2019 11:10 am

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.
MX Linux 18.3 - Panasonic CF-30 - 3GB RAM - 160GB HDD - Core 2 Duo

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

Re: Maximised window title border crop patch for XFWM

#4

Post by Stevo » 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.

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

Re: Maximised window title border crop patch for XFWM

#5

Post by Adrian » 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.

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

Re: Maximised window title border crop patch for XFWM

#6

Post by Stevo » Thu May 02, 2019 4:36 pm

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
Forum Regular
Forum Regular
Posts: 508
Joined: Sun Oct 15, 2017 11:34 am

Re: Maximised window title border crop patch for XFWM

#7

Post by dreamer » 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.

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

Re: Maximised window title border crop patch for XFWM

#8

Post by AK-47 » Fri May 03, 2019 5:15 am

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.
MX Linux 18.3 - Panasonic CF-30 - 3GB RAM - 160GB HDD - Core 2 Duo

User avatar
dreamer
Forum Regular
Forum Regular
Posts: 508
Joined: Sun Oct 15, 2017 11:34 am

Re: Maximised window title border crop patch for XFWM

#9

Post by dreamer » Fri May 03, 2019 2:04 pm

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”