Here is an initial proposal for a fix to this issue for an Xubuntu environment (where XDG_SESSION_DESKTOP = xubuntu; XDG_CURRENT_DESKTOP = XFCE; and DESKTOP_SESSION = xubuntu).
First, in lib/Services/Environment.vala, add support for XDG_SESSION_DESKTOP being set to 'xubuntu' with a new case for 'xubuntu' that maps it to XFCE:
switch (s.down ()) {
. . .
case "xubuntu": result = XdgSessionDesktop.XFCE; break; . . .
Next, in lib/PositionManager.vala, allow XFCE to set monitor_geo via screen.get_monitor_geometry():
public void initialize ()
requires (controller.window != null)
{ . . .
bool session_desktop_is_XFCE = environment_is_session_desktop ( XdgSessionDesktop.XFCE );
bool session_desktop_is_UBUNTU_GNOME = environment_is_session_desktop ( XdgSessionDesktop.GNOME | XdgSessionDesktop.UBUNTU );
// NOTE don't call update_monitor_geo to avoid a double-call of dockwindow.set_size on startup
if ( session_desktop_is_XFCE || session_desktop_is_UBUNTU_GNOME ) {
screen.get_monitor_geometry (find_monitor_number (screen, controller.prefs.Monitor), out monitor_geo);
} else {
monitor_geo = screen.get_monitor_workarea (find_monitor_number (screen, controller.prefs.Monitor));
}
The same update can be made in the function screen_changed() in lib/PositionManager.vala. I'll see if I can prepare a patch based on the above.
As an observation from testing the interaction with the Xfce panel, using the above with screen.get_monitor_geometry() will force Plank to be positioned at the edge of the screen regardless of the arrangement of the Xfce panel. I don't mind this behavior, but it may cause Plank to be positioned on top of the Xfce panel in some situations.
I also found another work around: When the Xfce panel is configured to hide (intelligently or always as set via Panel Preferences), Plank will be positioned at the edge without the offset. Hide intelligently can probably suffice for most users until a suitable fix for Plank is developed.
Mario,
Could you please let me know what your environment variables are set to on your system?
Hi All,
Here is an initial proposal for a fix to this issue for an Xubuntu environment (where XDG_SESSION_DESKTOP = xubuntu; XDG_CURRENT_DESKTOP = XFCE; and DESKTOP_SESSION = xubuntu).
First, in lib/Services/ Environment. vala, add support for XDG_SESSION_DESKTOP being set to 'xubuntu' with a new case for 'xubuntu' that maps it to XFCE:
static XdgSessionDesktop from_single_string (string s) sktop result;
{
XdgSessionDe
switch (s.down ()) { op.XFCE; break;
. . .
. . .
case "xubuntu": result = XdgSessionDeskt
Next, in lib/PositionMan ager.vala, allow XFCE to set monitor_geo via screen. get_monitor_ geometry( ):
. . . desktop_ is_XFCE = environment_ is_session_ desktop ( XdgSessionDeskt op.XFCE ); desktop_ is_UBUNTU_ GNOME = environment_ is_session_ desktop ( XdgSessionDeskt op.GNOME | XdgSessionDeskt op.UBUNTU ); desktop_ is_XFCE || session_ desktop_ is_UBUNTU_ GNOME ) { get_monitor_ geometry (find_monitor_ number (screen, controller. prefs.Monitor) , out monitor_geo); get_monitor_ workarea (find_monitor_ number (screen, controller. prefs.Monitor) );
public void initialize ()
requires (controller.window != null)
{
bool session_
bool session_
// NOTE don't call update_monitor_geo to avoid a double-call of dockwindow.set_size on startup
if ( session_
screen.
} else {
monitor_geo = screen.
}
The same update can be made in the function screen_changed() in lib/PositionMan ager.vala. I'll see if I can prepare a patch based on the above.
As an observation from testing the interaction with the Xfce panel, using the above with screen. get_monitor_ geometry( ) will force Plank to be positioned at the edge of the screen regardless of the arrangement of the Xfce panel. I don't mind this behavior, but it may cause Plank to be positioned on top of the Xfce panel in some situations.
I also found another work around: When the Xfce panel is configured to hide (intelligently or always as set via Panel Preferences), Plank will be positioned at the edge without the offset. Hide intelligently can probably suffice for most users until a suitable fix for Plank is developed.
Mario,
Could you please let me know what your environment variables are set to on your system?
echo $XDG_SESSION_ DESKTOP DESKTOP
echo $XDG_CURRENT_
echo $DESKTOP_SESSION
Perhaps, we can find a fix for your Mint install too.
Best,
James