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

Add configuration option to hide Window Decorations #751

Closed
joshuataylor opened this issue Feb 6, 2023 · 13 comments
Closed

Add configuration option to hide Window Decorations #751

joshuataylor opened this issue Feb 6, 2023 · 13 comments
Labels
enhancement New feature or request

Comments

@joshuataylor
Copy link

tldr: I prefer to not show Window Decorations at all.

It would be great to add a config option that would allow users to hide window decorations, something like this:

<core>
  <decoration>server</decoration>
  <show_decorations>false</show_decorations>
</core>

Server side decorations would need to be enabled for this to work, I think?

In view.c, there is this code block:

void
view_set_decorations(struct view *view, bool decorations)
{
	assert(view);
	if (view->ssd_enabled != decorations && !view->fullscreen) {
		/*
		 * Set view->ssd_enabled first since it is referenced
		 * within the call tree of ssd_create()
		 */
		view->ssd_enabled = decorations;
		if (decorations && rc.show_decorations != true) {
			decorate(view);
		} else {
			undecorate(view);
		}
		view_apply_special_geometry(view);
	}
}

Here we could check if the config option has been set, then only decorate if it hasn't. By default it will decorate.

Right now I just have that codeblock commented out and use that. :-)

I'd be happy to implement this feature if this is something that is in scope of labwc and others agree.

Ideally, the initial implementation would consist of the following:

  1. Add a configuration option to core to toggle window decorations
  2. Add the check to that function (I think that's the best spot for it?)

Would love to get others thoughts on this :-)

@Consolatis
Copy link
Member

Consolatis commented Feb 6, 2023

I don't see an issue with providing that option, we could potentially just add a new value for the existing decoration flag, e.g. something like

<decorations>none</decorations>

We would need to explain in the docs that this setting may not prevent applications to still use client side decorations even though we told them that we prefer server side ones.

We should likely also allow users to disable decorations by default via none but still toggle them manually via the ToggleDecorations action.

Regarding the correct place to check, that one could do it. I think we also have a check somewhere else which decides on the initial state of view->ssd_enabled, likely split into a xwayland and a xdg one. Would need to look into that.

@Consolatis Consolatis added the enhancement New feature or request label Feb 6, 2023
@johanmalm
Copy link
Collaborator

I prefer to stay consistent with Openbox 3.6 unless there is good reason to deviate.

Consider

<applications>
  <application class="*">
    <decor>no</decor>
  </application>
</applications>

With s/class/app_id/ ?

Ref: http://openbox.org/wiki/Help:Applications

The following is also related:

<theme>
  <keepBorder>yes</keepBorder>
</theme>

We held off on implementing <applications> so far, but I think it feels right to go for it at some point.
See this comment for reference: #433 (comment)

@hype3
Copy link
Contributor

hype3 commented Feb 20, 2023

Is there any timeframe when this will be implented? Will it also be possible to use thicker borders if I want?

@joshuataylor
Copy link
Author

Hi!

Been super busy with some personal stuff, but this issue is just for tracking hiding the Window Decorations, so it goes from this:

2023-02-20_16-43

to this:
2023-02-20_16-41

@Consolatis

This comment was marked as off-topic.

@hype3

This comment was marked as off-topic.

@dglava

This comment was marked as off-topic.

@johanmalm

This comment was marked as off-topic.

@heroin-moose

This comment was marked as off-topic.

@Consolatis

This comment was marked as off-topic.

@johanmalm

This comment was marked as off-topic.

@Consolatis
Copy link
Member

Consolatis commented Mar 5, 2023

Regarding the screenshots above, this seems more like the issue we currently have with the default settings for the SSD decorations for Qt applications. E.g.

Edit:
Moved the keepBorder request to its own issue and marked the discussion about it as offtopic in this thread.

Edit 2:

@Consolatis
Copy link
Member

This should now be possible with something like this:

<windowRules>
    <windowRule identifier="*" serverDecoration="no" />
</windowRules>

Please comment if it isn't working or there are issues with the new feature.

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

No branches or pull requests

6 participants