Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rc.xml-section <mouse> in local config makes window headers unresponsive #23

Open
Jakko3 opened this issue Oct 17, 2024 · 2 comments
Open

Comments

@Jakko3
Copy link

Jakko3 commented Oct 17, 2024

LXQt upgraded from Qt5 to Qt6 by version 2.0.0. Since then, choosing a new Openbox theme makes the window headers "unresponsive".

Having a closer look, choosing a new theme adds a section <mouse></mouse> to ~/.config/openbox/rc.xml. Removing that section restores responsivity of the window headers.

Testing further it turns out that the defined mouse double-click action DOES work on the "unresponsive" window headers. But somehow this prevents the regular single-click behavior.

  • Distribution: postmarketOS (based on Alpine Linux)
  • User interface: LXQt 2.0.0
  • Openbox version: 3.6.1
@Jakko3 Jakko3 changed the title rc.xml-section <mouse> makes window headers unresponsive on Qt6 rc.xml-section <mouse> makes window headers unresponsive Oct 20, 2024
@Jakko3 Jakko3 changed the title rc.xml-section <mouse> makes window headers unresponsive rc.xml-section <mouse> in local config makes window headers unresponsive Oct 20, 2024
@Jakko3
Copy link
Author

Jakko3 commented Oct 20, 2024

I realized that the issue didn't show up at the time when upgrading LXQt to version 2.0.0 (and thus switching from Qt5 to Qt6). It was already present when LXQt was on version 1.4.0 (using Qt5). Therefore the issue is not related to Qt6.

On postmarketOS v23.12 (based on Alpine Linux v3.19) the issue is not present. Whereas on postmarketOS v24.06 (based on Alpine Linux v3.20) the issue is there.

Comparing the two situations, I noticed that (after changing the theme) the <mouse> section in file ~/.config/openbox/rc.xml in postmarketOS v23.12 is quite long (like in the file /etc/xdg/openbox/rc.xml) and in postmarketOS v24.06 it just about six lines short.

In postmarketOS/Alpine LXQt changing the openbox theme is done by GUI obconf-qt. However, between Alpine v3.19 and Alpine v3.20 the version of openbox didn't change (version 3.6.1) and obconf-qt just slightly (changed version 0.16.3 to 0.16.4). Upgrading/downgrading the obconf-qt package doesn't change the behavior. So currently it's not clear to me what causes the issue.

I'll try to investigate further how the file ~/.config/openbox/rc.xml gets generated.

@Jakko3
Copy link
Author

Jakko3 commented Nov 9, 2024

A first cognition is that I implemented a partial rc.xml in postmarketOS under the wrong assumption that several partial rc.xml files could cumulatively sum up to one complete rc.xml file.

That's not the case. In obt/xml.c function obt_xml_load_config_file() openbox does go through the xdg_paths...
https://github.com/Mikachu/openbox/blob/release-3.6.1/obt/xml.c#L215

... but in function load_file() the for-loop stops...
https://github.com/Mikachu/openbox/blob/release-3.6.1/obt/xml.c#L143

... as soon as one rc.xml file with content was found, picking that file.
https://github.com/Mikachu/openbox/blob/release-3.6.1/obt/xml.c#L176

In postmarketOS currently a partial rc.xml with the following content gets installed to path /etc/xdg/lxqt-tablet/openbox/rc.xml. The environment variable XDG_CONFIG_DIRS gets changed to prepone that file over the default /etc/xdg/openbox/rc.xml. While I assumed they get collected one after the other, it turned out that the first one gets picked and applied. So instead of being an intended partial rc.xml file, the following became the full rc.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
  <desktops>
    <number>2</number>
  </desktops>
</openbox_config>

One of the reasons I thought several partial rc.xml files would cumulate to one complete rc.xml was that in practice the above snippet actually works as a stand-alone rc.xml. It seems it's in openbox/config.c where obt_xml_node_contains() checks if there is a value and else "default" gets chosen, but I don't know exactly how it works.
https://github.com/Mikachu/openbox/blob/release-3.6.1/openbox/config.c

Next I'll look into ObConf and ObConf-Qt how they act on an incomplete "partial" rc.xml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant