How to get maximized windows appears floating style?

It prevents the other window from covering the area that Conky is occupying, and if Conky is blank but transparent, and set along a screen border (ie: set up with border_outer_margin = 10, for instance), the other window will expand to within 20 pixels (10 pixels on each side of Conky) of the edge of the screen, but it'll still 'think' it's maximized, and its corners still go square.

2 Likes

I was afraid of this:

I may be wrong about any available gnome extensions however. :expressionless:

1 Like

So it's the maximized state then... I wonder if the action can be rewired to simply resize the window instead, calculating the amount of space available similar to how tiling window managers do?

Maybe this?

Apparently, in Ubuntu, you can also do:
Settings> System>Multitasking>Snap Windows to OFF
... how do we do that in Zorin OS?

[EDIT]
Ah, figured it out. Start gnome-tweaks, go to the 'Windows' side-tab, deselect "Edge Tiling". Still doesn't change to a rounded titlebar, though.

Ubuntu considers rounded corners on maximized windows to be a 'bug', rather than a user choice:

... and Aravisian is correct... they "Don't apply titlebar shape mask to maximized windows". So editing the CSS file will do nothing.

[EDIT]
Ah... they initially considered square corners on maximized windows to be a bug... and they tried to fix it and introduced performance problems for "old hardware/broken drivers/non compositing WM", so they disabled rounded corners on maximized windows for everyone. LOL

"currently we agreed that round corners is what we want (even before we full-rebased on adwaita)"

"To fully support such themes we need to make toplevel window transparent with ARGB visual. It may cause performance issue..."

And now, in a complete 180-degree reversal, what they considered to be a bug is now desired behavior, and the previously-desired behavior is a bug. LOL

1 Like

So that actually works, but the border rounding won't take into account the content within the window and it crops whatever is there. I would assume this is fine for most applications but here you can see an example where it's a bit annoying:

Actually, it doesn't look good since the padding eats away space from the window itself rather than shrinking it, and it affects every window not just those maximized.

1 Like

I tried:
gsettings set org.gnome.mutter round-corners-radius 10
... and I tried setting it in DConf-Editor, but there's nowhere to set it... we're missing the base settings to even get it set up to change it via dconf.

Whoa! DO NOT do this!
gsettings set org.gnome.desktop.wm.preferences button-layout appmenu

Your minimize, maximize and close buttons on all windows disappear. Come to think of it... that'd be a neat prank. :japanese_ogre:

To get them back:
gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"

If you want them on the left-hand side of the window:
gsettings set org.gnome.desktop.wm.preferences button-layout "close,minimize,maximize:"

Or you can mix and match:
{minimize & maximize on left, close on right}
gsettings set org.gnome.desktop.wm.preferences button-layout "minimize,maximize:close"

{close on left, minimize and maximize on right}
gsettings set org.gnome.desktop.wm.preferences button-layout "close:minimize,maximize"

{close, minimize and maximize on left and right}
gsettings set org.gnome.desktop.wm.preferences button-layout "close,minimize,maximize:close,minimize,maximize"

1 Like

Oh, BTW... here's the code that does it:

Now we just have to find and hack that.

The css tag you want is going to be the @media... then add a radius for each size. It won't pass the screen size but rather media reference to the sizes supported. If you can find the maximize button command (js?) You can edit the monitor size minus a pixel or two, but will most likely have to add the media tag with that size to add the radius.

I have installed the *-dev package on one of my machines to go through this concern and destroy it after getting things consolidated.

I can open GTK Inspector with particular app only; Please advice on how to open it for the whole theme.

the below command,

gsettings get org.gnome.desktop.interface gtk-theme "ZorinGrey-Light"

results as below, even after installing the *.dev package

Usage:
  gsettings [--schemadir SCHEMADIR] get SCHEMA[:PATH] KEY

Get the value of KEY

Arguments:
  SCHEMADIR A directory to search for additional schemas
  SCHEMA    The name of the schema
  PATH      The path, for relocatable schemas
  KEY       The key within the schema

Please advise;
what arguments should be passed to the above command to continue further?

man gsettings

gsettings list-keys org.gnome.desktop.interface

gsettings list-recursively

GTK Inspector operates by inspecting an app that uses that theme. It is not possible to try to open it for a theme as that is redundant - and it is not a Running Application.
It is used to inspect an application - but this allows you access to viewing the elements of the entire theme all the same. It can be used to inspect theme elements, in addition to inspecting GTK elements.
In other words; you cannot launch an element of an application from the terminal. There is no possible means of ever doing this.
You must launch an actual running application; then inspect its elements.

1 Like

yes @Aravisian I got it; It means playing with CSS in this case looking like fighting with the wind; i.e. go after each application to locate relative CSS nodes and to modify it individually.

That's why I'm trying to find out another approach; for instance, the below function is apart of panel.js under zorin-taskbar extension.

getGeometry: function() {
	let scaleFactor = Utils.getScaleFactor();
	let panelBoxTheme = this.panelBox.get_theme_node();
	let lrPadding = panelBoxTheme.get_padding(St.Side.RIGHT) + panelBoxTheme.get_padding(St.Side.LEFT);
	let topPadding = panelBoxTheme.get_padding(St.Side.TOP);
	let tbPadding = topPadding + panelBoxTheme.get_padding(St.Side.BOTTOM);
	let position = this.getPosition();
	let gsTopPanelOffset = 0;
	let x = 0,
		y = 0;
	let w = 0,
		h = 0;

	this.dtpSize = Me.settings.get_int('panel-size') * scaleFactor;

	if (this.checkIfVertical()) {
		if (!Me.settings.get_boolean('group-apps')) {
			// add window title width and side padding of _dtpIconContainer when vertical
			this.dtpSize += Me.settings.get_int('group-apps-label-max-width') + AppIcons.DEFAULT_PADDING_SIZE * 2 / scaleFactor;
		}

		this.sizeFunc = 'get_preferred_height',
			this.fixedCoord = {
				c1: 'x1',
				c2: 'x2'
			},
			this.varCoord = {
				c1: 'y1',
				c2: 'y2'
			};

		w = this.dtpSize;
		h = this.monitor.height - tbPadding - gsTopPanelOffset;
	} else {
		this.sizeFunc = 'get_preferred_width';
		this.fixedCoord = {
			c1: 'y1',
			c2: 'y2'
		};
		this.varCoord = {
			c1: 'x1',
			c2: 'x2'
		};

		w = this.monitor.width - lrPadding;
		h = this.dtpSize;
	}

	if (position == St.Side.TOP || position == St.Side.LEFT) {
		x = this.monitor.x;
		y = this.monitor.y + gsTopPanelOffset;
	} else if (position == St.Side.RIGHT) {
		x = this.monitor.x + this.monitor.width - this.dtpSize - lrPadding;
		y = this.monitor.y + gsTopPanelOffset;
	} else { //BOTTOM
		x = this.monitor.x;
		y = this.monitor.y + this.monitor.height - this.dtpSize - tbPadding;
	}

	return {
		x: x,
		y: y,
		w: w,
		h: h,
		lrPadding: lrPadding,
		tbPadding: tbPadding,
		position: position
	};
},

In my case, bottom placement of taskbar;

...
	} else { //BOTTOM
		x = this.monitor.x;
		y = this.monitor.y + this.monitor.height - this.dtpSize - tbPadding;
	}
...

The above, calculates the coordinates of the lower box containing the taskbar as shown below,

The global values to be recalled for assignments at the top of the getGeometry() function are located at /usr/share/gnome-shell/extensions/zorin-taskbar@zorinos.com/stylesheet.css and hence the values of w,h,x,y to be calculated as per selected placement.

yes, I understand that, the above calculations are concerned with taskbar only; but for sure the outcome goes somewhere to define what I call it Display Area I don't know what the appropriate term in Gnome.

Any clue please, where that calculations goes to control the display area no matter which application?

If I am understanding you correctly - Which I have doubts that I am; I think you are asking about xprop x window properties:

Ooooh! That's neat. Just type xprop, then click on anything, and it gives you the parameters for that thing.

Please be sure to also check out xdotool and wmctrl for more awesome tool utilities.

I've been going through the list of available commands (via compgen -c | sort | uniq # Show all available commands) and figuring out how to use them in neat ways.

It's a long list... I've got 1861 commands available.

I just found xman... it pops up a small window, you click 'Manual Page', then you click the 'Sections' menu, then the '(1) User Commands' menu... rather than having to type man xxxx for each command you're learning about, they're all right there.

Click 'Options', then 'Show Both Screens', then drag the bottom screen up a bit (grab the little square on the horizontal line and drag it upward) so you can see the contents, and you can then click through each user command in the top of the screen, and read about that command in the bottom of the screen.

3 Likes

@Mr_Magoo Thank you X MAN!! you brought the whole linux dictionary!
but wait, what's the plan? what we are looking for right here?

Please have a look GTK and help me to narrow the issue.

I read little on Gnome UI design, JS interaction etc... but unfortunately no straight forward manual having an answer for that simple thing Display Area we're looking for.

The below, is another part of panel.js lines 198-242

        // The overview uses the panel height as a margin by way of a "ghost" transparent Clone
        // This pushes everything down, which isn't desired when the panel is moved to the bottom
        // I'm adding a 2nd ghost panel and will resize the top or bottom ghost depending on the panel position
        this._myPanelGhost = new Clutter.Actor({ 
            x: this.geom.x,
            y: this.geom.y ,
            reactive: false, 
            opacity: 0
        });

        let isTop = this.geom.position == St.Side.TOP;

        if (isTop) {
            this.panel._leftCorner = this.panel._leftCorner || new Panel.PanelCorner(St.Side.LEFT);
            this.panel._rightCorner = this.panel._rightCorner || new Panel.PanelCorner(St.Side.RIGHT);

            Main.overview._overview.insert_child_at_index(this._myPanelGhost, 0);
        } else {
            let overviewControls = Main.overview._overview._controls || Main.overview._controls;
            
             if (this.geom.position == St.Side.BOTTOM) {
                Main.overview._overview.add_actor(this._myPanelGhost);
            } else if (this.geom.position == St.Side.LEFT) {
                overviewControls._group.insert_child_at_index(this._myPanelGhost, 0);
            } else {
                overviewControls._group.add_actor(this._myPanelGhost);
            }
        }

        if (this.panel._leftCorner) {
            Utils.wrapActor(this.panel._leftCorner);
            Utils.wrapActor(this.panel._rightCorner);

            if (isTop) {
                if (this.isStandalone) {
                    this.panel.actor.add_child(this.panel._leftCorner.actor);
                    this.panel.actor.add_child(this.panel._rightCorner.actor);
                }
            } else if (Config.PACKAGE_VERSION >= '3.32') {
                this.panel.actor.remove_child(this.panel._leftCorner.actor);
                this.panel.actor.remove_child(this.panel._rightCorner.actor);
            }
        }

        this._setPanelPosition();

@Mr_Magoo Please help with relevant CSS parameters for what's called myPanelGhost above.

That's the nearest part I found dealing with the Display Area
The above section works when you change panel placement < ^ >

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.