Bug 295382 - Login greeter is misplaced in a dual screen setup with different types of monitors
Summary: Login greeter is misplaced in a dual screen setup with different types of mon...
Status: RESOLVED FIXED
Alias: None
Product: lightdm
Classification: Miscellaneous
Component: theme-userbar (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: 0.2.0
Assignee: David Edmundson
URL:
Keywords:
: 298739 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-05 20:35 UTC by Luca Beltrame
Modified: 2012-07-23 11:11 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of the misplaced greeter (218.39 KB, image/png)
2012-06-01 15:41 UTC, Luca Beltrame
Details
lightdm-kde multi-monitor screenshot (548.05 KB, image/jpeg)
2012-07-06 23:34 UTC, Nuno Bento
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Beltrame 2012-03-05 20:35:48 UTC
I have the following setup:

Primary monitor: 1920x1200
Secondary monitor: 1600x900

The secondary monitor is on the left of the primary, rotated 90 degrees.

I set up LightDM's resolution with the following script, according to the LightDM configuration:

/usr/bin/xrandr --output DisplayPort-0 --pos 900x0 --mode 1920x1080 --refresh 60\nxrandr --output DisplayPort-1 --pos 0x0 --mode 1600x900 --rotate left --refresh
 59.9782
/usr/bin/xrandr --output DisplayPort-0 --primary

What happens is that the greeter is on the primary screen, but moved towards the lower left of the screen, i.e. in the  middle position of the work area of the two combined monitors including the non-visible space (or "dead area"). In other words, the greeter takes into account the "dead area" of the display while it shouldn't (like KDE does).
Comment 1 David Edmundson 2012-04-29 00:04:51 UTC
*** Bug 298739 has been marked as a duplicate of this bug. ***
Comment 2 David Edmundson 2012-05-05 20:46:29 UTC
I've started this.

Created a model for each screensize then backgrounds are loaded in a repeater.
Struggling to test as I only have one monitor...

Volunteers?
Comment 3 Luca Beltrame 2012-05-06 07:46:50 UTC
In data sabato 05 maggio 2012 20:46:29, hai scritto:

> Created a model for each screensize then backgrounds are loaded in a
> repeater. Struggling to test as I only have one monitor...

I can test. Where should I pull the code from?
Comment 4 David Edmundson 2012-05-19 19:28:17 UTC
git@git.kde.org:scratch/davidedmundson/lightdm

branch multi_montior.
Set the theme to classic.
If you get one background nicely fitting per screen things are working well. If it looks horrific, then no.

You can take a screenshot with cntrl + alt + s

Right now this isn't trying to address the reported issue, just making baby steps towards it.
Comment 5 Luca Beltrame 2012-06-01 15:14:41 UTC
In data sabato 19 maggio 2012 19:28:17, hai scritto:

I finally got around to test this branch.

> Set the theme to classic.
> If you get one background nicely fitting per screen things are working well.
> If it looks horrific, then no.

It looks even worse than normal, I'm afraid. Part of the wallpaper now is not 
even drawn on the second screen, which has a white area without background, 
and also the "boundary" between the two wallpapers is misplaced in the first 
screen. And the greeter is still moved to the lower left.

> You can take a screenshot with cntrl + alt + s

I tried to, to attach it to the bug, but I don't know where it's saved.
Comment 6 David Edmundson 2012-06-01 15:26:31 UTC
Oops. I'm disappointed, but not really surprised.

Screenshot is put in /tmp called lightdm-kde-greeter-screenshot.png
Comment 7 Luca Beltrame 2012-06-01 15:41:11 UTC
Created attachment 71498 [details]
Screenshot of the misplaced greeter

Note that the display on the screenshot is different than what's actually shown on screen (i.e. the login is showed in the middle, but it isn't).
Comment 8 David Edmundson 2012-06-09 01:59:08 UTC
Turns out I'm an idiot.
            height: geometry.heigh
should be
            height: geometry.height

I've updated my branch in playground, could you try it again. I was able to get two monitors going earlier (laptop + TV) and it seemed to work for me. Could you check too please.

Then I'll make everything else work.
Comment 9 David Edmundson 2012-06-27 01:02:56 UTC
I've update my scratch repo again. 
kde:scratch/davidedmundson/lightdm-kde

multi-montior (in classic theme) should now work perfectly.
Tested it on a two screen setup, would be good to get more feedback.
Comment 10 Nuno Bento 2012-07-06 23:34:34 UTC
Created attachment 72348 [details]
lightdm-kde multi-monitor screenshot

I just tested the latest version from the scratch repo and it's almost working for me. Let me start out by explaining my setup. I have a display with 1920x1080 resolution (left) and a second one with 1280x1024 (right). When using the multi_monitor branch I got what you see in the attached screenshot.

Based on the screenshot and some other tests I conducted, I realised the picture being used as a background for the right screen was not being cropped as expected (hence the overflow). Changing the "Image.PreserveAspectCrop" parameter in the main.qml file for the classic theme, to any other (e.g. Center, PreserveAspectFit, Stretch, Tile, you name it), gives the expected behaviour. Could there be a bug with the PreserveAspectCrop parameter?

Besides that, there seems to be a bug with the "session select dialog" (also visible on the screenshot). I fixed this by replacing "parent" with "activeScreen" in line 258 of main.qml. 

Both these fixes are rather simple so I don't see much need to submit a patch (that and I suck at creating patches...). If there's anything else that needs testing regarding multi-monitor just let me know.

(Off-Topic: this was my first time looking at anything QML related and I'm surprised at how simple and easy to understand it is.)
Comment 11 David Edmundson 2012-07-13 16:09:51 UTC
Git commit c68bb6056cc6c913d0a847e57d8324aef26affe6 by David Edmundson.
Committed on 13/07/2012 at 17:51.
Pushed by davidedmundson into branch 'master'.

Show options dialog on the correct screen

REVIEW: 105368

M  +1    -1    themes/classic/main.qml

http://commits.kde.org/lightdm/c68bb6056cc6c913d0a847e57d8324aef26affe6
Comment 12 David Edmundson 2012-07-13 16:10:48 UTC
Fixed in the classic theme. (except for the wallpaper tiling bug, that's minor and can be dealt with later).

Needs fixing for userbar.
Comment 13 David Edmundson 2012-07-21 16:19:13 UTC
Theme classic is fixed, reassigning bug to theme-userbar
Comment 14 David Edmundson 2012-07-23 11:11:42 UTC
Git commit 0cbde408b327a7912ae0ea7e1c7a32ab7f9824b4 by David Edmundson, on behalf of Nunu Bento.
Committed on 23/07/2012 at 13:05.
Pushed by davidedmundson into branch 'master'.

Multi monitor support in Userbar theme
Reviewed-by: David Edmundson

A  +52   -0    themes/userbar/ScreenManager.qml     [License: UNKNOWN]  *
M  +25   -16   themes/userbar/main.qml

The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


http://commits.kde.org/lightdm/0cbde408b327a7912ae0ea7e1c7a32ab7f9824b4