Comment 5 for bug 2031981

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

Hi Rico, et al.,

I did some hacking in the source code. The issue seems to be related to how PositionManager (in lib/PositionManager.vala) sets the monitor_geo object for Xfce in the initialize function reproduced below:

  public void initialize ()
   requires (controller.window != null)
  {
   unowned Gdk.Screen screen = controller.window.get_screen ();

   controller.prefs.notify.connect (prefs_changed);
   screen.monitors_changed.connect (screen_changed);
   screen.size_changed.connect (screen_changed);
   screen.composited_changed.connect (screen_composited_changed);

   // NOTE don't call update_monitor_geo to avoid a double-call of dockwindow.set_size on startup
   if (environment_is_session_desktop (XdgSessionDesktop.GNOME | XdgSessionDesktop.UBUNTU)) {
    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));
   }

   screen_is_composited = screen.is_composited ();
  }

Under my Xfce config, monitor_geo is getting set via get_monitor_workarea in the else block. I hacked the else block to set monitor_geo using get_monitor_geometry instead of get_monitor_workarea, and plank was positioned at the bottom of the screen as expected.

I've tried adding XdgSessionDesktop.XFCE as an option in the if statement, but it's not getting triggered for some reason. I'll play around with it some more.

Best,
James

Here's my build information:

[INFO 22:19:36.376682] [AbstractMain:229] Plank version: 0.11.89.20-396b8-dirty
[INFO 22:19:36.376696] [AbstractMain:230] Kernel version: 6.2.0-39-generic
[INFO 22:19:36.376708] [AbstractMain:231] GLib version: 2.72.4 (2.72.4)
[INFO 22:19:36.376723] [AbstractMain:234] GTK+ version: 3.24.33 (3.24.33)
[INFO 22:19:36.376735] [AbstractMain:237] Wnck version: 40.1.0
[INFO 22:19:36.376759] [AbstractMain:238] Cairo version: 1.16.0
[INFO 22:19:36.376781] [AbstractMain:239] Pango version: 1.50.6