Comment 1 for bug 910870

Revision history for this message
vsm (vonsachermasoch) wrote :

Maybe it is too late (0.3 is final?) but I've had this problem in latest Manjaro (0.8.7) which packs oblogout 0.2, apparently.

Well, the fix above works just fine but has the minor drawback of limiting the size of the window object and, thus, limits the fading of the screen to only 1 screen of the 2.

To solve this, I suggest the following dirty hack:

1) live line 163 alone (or restore it to original)

2) delete line 121 [self.mainpanel.pack_start(gtk.VBox())]

3) add this instead:

        if int(gtk.gdk.screen_get_default().get_n_monitors()) == 2:
            self.mainpanel.set_homogeneous(True)
        else:
            self.mainpanel.pack_start(gtk.VBox())

What this does is it checks if we are on a dual monitor setup. If yes, we do not add the first VBox (line 121 was deleted...) and instead we set "homogeneous" to "true".

By doing this we obtain a 50/50 distribution on the width of both monitors between i) the "self.buttonpanel" (line 122 in the original code) and ii) the remaing "gtk.VBox()" which is later added in the script (line 123 of the original code).

So, the buttonpanel gets the entire monitor 0 while the VBox fills monitor 1. If you like your buttons to be on your other monitor, just invert the buttonpanel and VBox lines.

Else, if we are in a single monitor setup, just add a VBox before the buttonpanel and the next VBox as it was in the original, evenly panning the buttons in the middle.

The conditional checks for "== 2" instead of "> 1" because in the unlikely hypothesis that some lucky guy works on a triple monitor setup, we still want the buttons to appear in the middle.

Hope this helps.