FS#72023 - [openbox] Top border for undecorated maximized windows drawn

Attached to Project: Community Packages
Opened by Oliver (xkwnwba) - Saturday, 04 September 2021, 11:56 GMT
Last edited by Chih-Hsuan Yen (yan12125) - Friday, 01 October 2021, 03:04 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Chih-Hsuan Yen (yan12125)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
No borders should be drawn for maximized windows. If window decorations are turned off in openbox (rc.xml), the top border is still displayed when the windows are maximized.

The linked debian bug report explains why this is a bug and not a feature.

Debian had fixed the bug on December 31, 2018 with the linked patch below in version 3.6.1-8.

Additional info:
* package version(s): <= 3.6.1-7
* link to debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917204
* link to patch that fixes the debian package: https://github.com/mati75/openbox-debian/blob/09b1c165a4ac7f54897f2b4c2fee8d1d33c7b829/debian/patches/917204_undecorated_maximized_no_border.patch

Steps to reproduce:
1. Edit rc.xml
1a. Turn off window decorations
<application class="*">
<decor>no</decor>
</application>
1b. Keep window borders turned on
<theme>
<keepBorder>yes</keepBorder>
</theme>
2. Maximize a window
3. Top border is drawn
This task depends upon

Closed by  Chih-Hsuan Yen (yan12125)
Friday, 01 October 2021, 03:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  openbox 3.6.1-8
Comment by Chih-Hsuan Yen (yan12125) - Sunday, 12 September 2021, 04:07 GMT
Thanks for the information, but I'm not sure if I understand the bug. From the debian bug,

> This top border is also annoying in several circumstances (e.g. in order to click on a tab in firefox you have to be bellow the top of the screen so you need to be precise with the mouse).

However, it seems still the case after I applying the patch (see the attached PKGBUILD). Could you add some more descriptions and/or screenshots about the issue?
   PKGBUILD (2.9 KiB)
Comment by Oliver (xkwnwba) - Sunday, 12 September 2021, 20:41 GMT
Thank you for providing the PKGBUILD. It doesn't work for me either, so I tested and confirmed it kinda (details below) working on Ubuntu with Ubuntu latest package (3.6.1-9).

I think you got the problem right but I will try to add more details. For the screenshots attached I applied an openbox theme with a yellow 1px border. The screenshots are on Arch and maximized firefox window.

With window decorations on there is no (top) border drawn as soon as maximized (see attached decor-on_arch.png).
With window decorations off and option to keep border on there is no side and bottom border but still a top border drawn (see attached decor-off_keepborder-on.png). This is not only visually annoying but also affects the firefox tab behaviour as you cited from the original bug report.

> This top border is also annoying in several circumstances (e.g. in order to click on a tab in firefox you have to be bellow the top of the screen so you need to be precise with the mouse).

As you can see with the top 1px border drawn it is not possible to select the firefox tab when the mouse cursor is placed at the very top over the 1px border (see attached decor-off_keepborder-on.png). I simulated the top border not drawn with turned off keepBorder option and you can see that the same cursor placement does select the firefox tab, because there is no border added (see attached decor-off_keepborder-off.png).

Since the linked patch in my original post doesn't seem to solve this behaviour, I set up Ubuntu with openbox package provided by Ubuntu (should be the same as debian). I replicated the config with window decorations off and keepBorder option on as stated in my original post. As expected from the solved debian bug report there is indeed no top border drawn for the maximized window. Some debian patch must have fixed the problem, maybe the linked patch is not sufficient.
What is odd though is that Ubuntu openbox does draw a top border for window decorations on, which shouldn't be the case. Arch doesn't so the behaviour for top border seems reversed on Arch and Ubuntu regarding to window decorations turned on or off.
Comment by Chih-Hsuan Yen (yan12125) - Sunday, 19 September 2021, 05:02 GMT
Thanks a lot for detailed explanations and screenshots. Seems I understand the bug correctly.

So, I tried it again and something strange happened! With Debian patch #917204, I can select the firefox tab when the mouse cursor is placed at the very top. I remember it wasn't the case. Maybe some other packages interferes, or openbox is complicated. I added the patch and pushed community-testing/openbox 3.6.1-8, hoping to get more feedbacks.

By the way, I still don't get such a yellow border with Firefox using `<decor>no</decor>` and `<keepBorder>yes</keepBorder>`, either with or without that Debian patch. That might be a different issue.
Comment by Oliver (xkwnwba) - Sunday, 19 September 2021, 19:33 GMT
Thank you very much for the testing version and explanation.

I installed community-testing/openbox 3.6.1-8 on my machine and can confirm it is working. My only issue is that I can see the (yellow) border for a brief moment while the window is closing. This is only noticeable with a bright color, might be related to my machine and is not really an issue. I have to test in a clean setup.

Regarding the yellow border, that is just a openbox theme setting. Yours is probably in a color similar to the background color.

You can get a more visible border by editing the applied openbox themerc (~/.themes/<yourtheme>/openbox-3/themerc):

window.*.border.color: #fffacd
border.width: 1

I have attached an edited Clearlooks themerc for testing purposes, if someone finds it useful. It can be applied with ObConf.
   themerc (4.3 KiB)
Comment by Chih-Hsuan Yen (yan12125) - Friday, 24 September 2021, 11:41 GMT
Hmm, still not seeing the yellow border. Anyway, it's fine as long as the issue is (mostly) fixed for you :)

I moved openbox 3.6.1-8 to [community]. Let me keep this ticket open for a few more days to see if the patch brings issues.
Comment by Chih-Hsuan Yen (yan12125) - Friday, 01 October 2021, 03:04 GMT
Ok, no recent forum posts, bug reports or mails on arch-general about this change. Good to go IMO ;)

Loading...