I have an annoyance with Compiz. When I save a file to the desktop the icon for said file is drawn under the menu bar. If I’m saving enough of them to have a list that grows to the bottom of the screen, the last one is created under the task bar. Enough of them show so I can do stuff with them. like open them or move them, but it’s annoying. This did not happen with Marco. Is there some setting I can change that will prevent icons from being drawn under either the menu or task bars? And will it matter that I have two monitors, not showing the same image?
Do the icons stay below the panel? Try to to set the panels below with the wmctrl.
First install wmctrl.
sudo apt update && sudo apt install wmctrl -y
then run:
for win_id in $(wmctrl -lx | grep "mate-panel.Mate-panel" | cut -d' ' -f1); do wmctrl -i -r $win_id -b add,below; done
If it works, it will work only for the current session.
@Moonguide - how are your monitors laid out? Do you have a screenshot of the entire desktop (with said icons under the panel) that you could share?
Without knowing more, I would guess that you have a panel in the edge between the two monitors, and currently mate-panel ignores those when telling Compiz how to calculate the desktop area.
@vkareh That makes it clear.
Where are those struts?
Is this the issue with compiz?
If so, maybe the panel needs to be reloaded from the terminal after switch to compiz takes place:
mate-panel --replace &
I hope that manually setting the _NET_WM_STRUT_PARTIAL
property with the xprop
command isn’t the only way.
Not sure what “where are those struts” means. If it’s in reference to the wallpaper image, that’s Ecola State Park, Cannon Beach, Oregon, USA.
mate-panel --replace & had no visible effect.
I also tried:
$ for win_id in $(wmctrl -lx | grep “mate-panel.Mate-panel” | cut -d’ ’ -f1); do wmctrl
All I saw was:
the > character.
Was there something else I was supposed to do? I closed it with ctrl-C. It had no effect on the problem behavior.
Also, another odd behavior has shown up. When I click on a link in an email, (Thunderbird), it opens in Firefox, but the title bar in the Firefox window is missing. Clicking twice on the Firefox button in the task bar brings the window back with its title bar.
Sorry I was asking vkareh.
By one of the freedesktop specifications (Extended Window Manager Hints (EWMH) specification) “strut” is like a reserved space at the edge of the screen for the windows. And the pan els are windows too, with some special properties of course.
There is a property _NET_WM_STRUT_PARTIAL
https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html
This property MUST be set by the Client if the window is to reserve space at the edge of the screen.
Window managers must listen to this property by the EWMH spec.
This property can be set manually with the “xprop” command. Compiz follows this property and moves the icons under the reserved space. That is until the matre-panel changes this property. At least in cases with a single monitor.
You can check _NET_WM_STRUT_PARTIAL
property if you run
xprop _NET_WM_STRUT_PARTIAL
and when the mouse pointer changes into “+” click on the upper panel.
With the same method you can check the window geometry, the command is xwininfo
xwininfo
Thanks for the definition of a strut.
For the left hand monitor:
$ xprop _NET_WM_STRUT_PARTIAL
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 28, 0, 0, 0, 0, 0, 0, 1279, 0, 0
$ xwininfo
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
xwininfo: Window id: 0xc00006 “x-caja-desktop”
Absolute upper-left X: 0
Absolute upper-left Y: 0
Relative upper-left X: 0
Relative upper-left Y: 0
Width: 3200
Height: 1080
Depth: 24
Visual: 0x2b
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0xc00005 (not installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners: +0+0 -0+0 -0-0 +0-0
-geometry 3200x1080+0+0
You clicked on the desktop for xwininfo command instead of the top panel.
Now I can see the right monitor resolution is 1920x1080, and the left one is probably 1280x1024, (I assume 1024 pixels height). The top panel’s height is 28 pixels.
Now, can you run next command and then click on the top panel. Don’t click on the desktop only on the top panel, and make sure to copy all of the line, with all the 12 digits at the end.
xprop -f _NET_WM_STRUT_PARTIAL 32c -set _NET_WM_STRUT_PARTIAL 0,0,28,0,0,0,0,0,0,1280,0,0
Did something happen?
I copied and executed the entire xprop command. I did click on the panel as opposed to the desktop this time. Nothing happened. An image saved from Firefox still ends up under the panel.
@anon94368460 - yeah, mate-panel may set the struts as 0 depending on the monitor layout and the position of the panels. Even so, even if the struts are set, Compiz would use that to make its own decisions about the size of the workspace. I don't know much about Compiz, but since this doesn't happen in Marco, it seems as though the struts are being set by the panel. The issue is most likely in how Compiz sets the _NET_WORKAREA
:
_NET_WORKAREA
_NET_WORKAREA, x, y, width, height CARDINAL[4]/32
This property MUST be set by the Window Manager upon calculating the work area for each desktop. Contains a geometry for each desktop. These geometries are specified relative to the viewport on each desktop and specify an area that is completely contained within the viewport. Work area SHOULD be used by desktop applications to place desktop icons appropriately.
The Window Manager SHOULD calculate this space by taking the current page minus space occupied by dock and panel windows, as indicated by the _NET_WM_STRUT or _NET_WM_STRUT_PARTIAL properties set on client windows.
So it seems like Compiz is disregarding the panel struts...
So, Compiz is disregarding the panel struts, and Marko is iffy about setting focus to a file just opened. The Compiz issue is an annoyance, but the Marco issue causes real problems when I start typing something I expect to go into the file just opened. That’s not my only annoyance with Compiz, but I can live with it and with Compiz cutting off the title bar on Firefox, and moving the Firefox button to the right end of the task bar. I used Marko (Software compositor) in Ubuntu MATE 16.04 and it didn’t have the focus problem. I see that (Software compositor) is no long included in 18.04. From a background in mechanical maintenance, developers are breaking a long standing rule, “Don’t fix what ain’t broke.” It’s probably a matter of not seeing what happens in all situations. So maybe what’s needed is a broader test set. Other than the focus issue, I like Marko. I’ll keep checking from time to time and see if it gets fixed.
@Moonguide - the software compositor is now the adaptive compositor, if you have a capable GPU along with suitable drivers, it lets the GPU handle some of the off-screen drawing, which is a nice performance improvement. Otherwise it falls back to the same software compositor from 16.04. In Ubuntu, the drivers are somewhat borked on 64-bit architecture, and so you most likely have the exact same software compositor as before.
Other changes have been mostly bug fixes and accessibility/usability improvements. We haven’t fixed anything that wasn’t broken, that’s for sure.
The focus issue most likely has to do with changes in GTK and/or X11, neither of which we control…
Ah. Glad to hear you follow good don’t-fix procedures.
So, should I report the problem to somebody at GTK or X11? Or will my bug report get passed on to them?
Ah, for the original issue with Compiz you might want to report in the Launchpad for Ubuntu MATE. Compiz is a bit of a fragmented project, so that’s probably the best place at the moment. If you can, mark that it also affects Compiz and mate-panel just in case.
For any issue in Marco, do it directly in the Marco repository on GitHub (https://github.com/mate-desktop/marco), but the struts/workarea issues are already known and I’m working on a solution for them
It's miscalculating the _NET_WORKAREA
.
Don't know how compiz works. I have a theory it takes the width and the height from the bigger monitor on the right or maybe adds the width and the height from the both monitors. With x and y from the strut _NET_WORKAREA,
will go off the screen and the icons will go under the top panel.
As long as _NET_WORKAREA
is in the boundaries of the resolution it will be ok.
x+width <= screen_width and y+height <= screen_width
Have a 1920x1080 single monitor
top panel 30px
bottom panel 24px
Compiz calculated that _NET_WORKAREA
is
xprop -root _NET_WORKAREA _NET_WORKAREA(CARDINAL)= 0, 30, 1920, 1026
If I change the x to 10, 10+1920=1930, the icons go under.
xprop -root -f _NET_WORKAREA 32c -set _NET_WORKAREA 10,30,1920,1026
Set it back -- the icons are back.
The same thing happens with Marco when I trick it about where the workarea is.
xprop -root -f _NET_WORKAREA 32c -set _NET_WORKAREA 10,30,1920,1026,10,30,1920,1026,10,30,1920,1026,10,30,1920,1026
or
xprop -root -f _NET_WORKAREA 32c -set _NET_WORKAREA 0,30,1930,1026,0,30,1930,1026,0,30,1930,1026,0,30,1930,1026
But it doesn't last long, as it resets back when I launch the menu or change the width of the panel.
@Moonguide can you check the workarea on compiz and marco?
xprop -root _NET_WORKAREA
Compiz:
$ xprop -root _NET_WORKAREA
_NET_WORKAREA(CARDINAL) = 0, 0, 3200, 1080, 0, 0, 3200, 1080, 0, 0, 3200, 1080, 0, 0, 3200, 1080
Marco:
$ xprop -root _NET_WORKAREA
_NET_WORKAREA(CARDINAL) = 0, 28, 3200, 968, 0, 28, 3200, 968, 0, 28, 3200, 968, 0, 28, 3200, 968
Maybe related, maybe not, there is a behavior in Compiz that varies depending on which program I'm using. When I click on the desktop on the left hand monitor, and then click ctrl-alt-T to open a terminal window, it opens at the left hand edge of the right hand monitor. When I start up Skype it, too, opens at the left hand edge of the right hand monitor. I realize that that location is probably the center of the combined desktop area. Also, if I create a folder, no matter where I click on either monitor, (both Compiz and Marco) it's icon always shows up at the upper left hand corner of the left monitor. Are these behaviors something that can be changed?
Okay. Thanks. I'll try to get to that this afternoon.
@Moonguide From that data, vkareh was right - Compiz doesn’t know where are panel struts.
This is the commandthat will set NETWORKAREA like Marco. But not sure if this workaround would stick.
xprop -root -f _NET_WORKAREA 32c -set _NET_WORKAREA 0,28,3200,968,0,28,3200,968,0,28,3200,968,0,28,3200,968
As for window placement, different window managers have different rules about that. In mate you can center new windows or not. Control Center>Personal>Windows>Placement>(check box)center new windows
Xfce has how they call it “smart” window placement that cant be turned off. The worst thing with xfce is that it it uses a grid to remember the icon positions. And every time workarea changes it resets the icons.
Mate handles the icons a bit better.
As for workarea issues, I feel like some new property needs to be invented at freedesktop specifications to solve those issues.
Already working on it, I'm working on a proof of concept for mate along with the gnome flashback maintainer before we submit the proposal to the freedesktop standards group