Comment 7 for bug 2031981

Revision history for this message
James Sinton (jksinton) wrote :

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)
  {
   XdgSessionDesktop result;

   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?

echo $XDG_SESSION_DESKTOP
echo $XDG_CURRENT_DESKTOP
echo $DESKTOP_SESSION

Perhaps, we can find a fix for your Mint install too.

Best,
James