Multi monitor support

Bug #189037 reported by Jorge Castro
8
Affects Status Importance Assigned to Milestone
PyRoom
Fix Released
Medium
Florian Heinle

Bug Description

I have dual monitors. When I launch pyroom it only shows up on one of my monitors, and not the other. The problem is that pyroom "centers" itself between both monitors, so I effectively only see the left side of the program. It's as if it's treating both screens as one huge monitor.

Pyroom should probably just launch on one head.

Tags: bug

Related branches

Jorge Castro (jorge)
Changed in pyroom:
importance: Undecided → Wishlist
Revision history for this message
Jorge Castro (jorge) wrote :

Attaching a picture to better illustrate what I mean.

Revision history for this message
Bruno Bord (brunobord) wrote :

Nice one, Jorge. I've noticed it at work too, where I have a dual screen. Now I'll have to figure out how to detect dual screen...

Revision history for this message
Jorge Castro (jorge) wrote :

Had my friend Ryan Paul look at this and he came up with this patch, which "works for me".

He sends along a "if he really does need to use gtk.Fixed and manually set the width/height of self.vbox, that he should use get_monitor_geometry for the active monitor rather than using screen_width() and screen_height()"

Hope this works for you! (bzr bundle attached)

Bruno Bord (brunobord)
Changed in pyroom:
status: New → Confirmed
Revision history for this message
KenSentMe (jeroen-vandenieuwenhof) wrote :

I also have a problem with dual monitors. In my situation (Nvidia drivers) pyroom is stretched over 1,5 screen, and the program isn't scalable to 1 or 2 screens at all.

Revision history for this message
mrben (mrben) wrote :

Bruno - I've copied an exert of the code from the quiz software last year, which shows how I dealt with handling dual screen:

# Make fullscreen
tempwidth = self.displaywindow.get_screen().get_width()
width, height = self.displaywindow.get_size()
self.displaywindow.move(tempwidth - width - 100, height)
if (self.displaywindow.get_screen().get_n_monitors() > 1):
 self.displaywindow.fullscreen()

Some of that won't be relevant, but detecting if you have more than one screen is easy enough ;)

Revision history for this message
KenSentMe (jeroen-vandenieuwenhof) wrote :

This bug is marked as wishlist at the moment, but for me it's more of a bug than a feature request. Should i file a new bug for my problem, or should the status be changed?

Revision history for this message
Tony Whitmore (tonywhitmore) wrote :

I can confirm the same bug as KenSentMe, also with nvidia drivers on a dual-head set up across two 1280x1024 monitors.

Changed in pyroom:
importance: Wishlist → Medium
Revision history for this message
Adam Rooke (abelianr) wrote :

I will take a look at this later. There is a gtk.get_screen/gtk.set_screen option somewhere so we should be able to manage it from there.

Revision history for this message
KenSentMe (jeroen-vandenieuwenhof) wrote :

I took your branch for multi-monitor and made a screenshot. Just to let you know how it looks on my system. As you can see the buffer is displayed on the right side of the screen.

Revision history for this message
Adam Rooke (abelianr) wrote :

What would you like the default behaviour to be, just on one screen or split across two? Its quite hard for me to test without having two monitors...

Revision history for this message
KenSentMe (jeroen-vandenieuwenhof) wrote :

I dont think it would be good if you split the buffer over 2 screens. Lines will be broken and reading and writing will be a pain because of a gap between words or letters. I suggest just putting the text on one screen and maybe make the other screen black too (or something else, depending on the theme). This way you wont be disctracted by other programs running on the second screen, but the buffer is still on one screen.

Changed in pyroom:
status: Confirmed → In Progress
Revision history for this message
Jorge Castro (jorge) wrote :

I agree splitting is a bad idea. KenSentMe's recommendation sounds best.

Revision history for this message
Nathan Haines (nhaines) wrote : Re: [Bug 189037] Re: Multi monitor support

I have a friend who has two monitors and he would have a fit if PyRoom took over the second one. I can imagine all sorts of various widgets one might want in the second monitor. If we take over the display and blank out the second monitor, we should set this as a preference and default it to "off".
Sent via BlackBerry from T-Mobile

Revision history for this message
Adam Rooke (abelianr) wrote :

Maybe someone who has multiple monitors could take care of this - it is nearly impossible for me to test code without seeing the impact until someone reports on launchpad.
Any help greatly appreciated.

Revision history for this message
Topher Eatinger (topher-eatinger) wrote :

I have a pretty non-standard setup, two 22'' wide-screen monitors both tilted 90 degrees sitting side-by-side. I was having the same problems reported above, and was able to fix them with the attached tweak. PyRoom will start up on the monitor that has focus. It should also be noted that this tweak is designed to work for monitors placed side-by-side and will probably fail if used with a top-to-bottom setup.

Revision history for this message
Topher Eatinger (topher-eatinger) wrote :

A minor correction to account for top-to-bottom setups. This supplants the patch in the previous post.

Revision history for this message
Adam Rooke (abelianr) wrote :

is anyone with two monitors able to test/implement this? I have put the patch in but have no way of testing just yet.

Revision history for this message
Swizec (swizec) wrote :

Tried the experimental patch for this bug and the bug persisted. PyRoom still didn't display just on primary monitor, or at least centered the page on it, but tried using both and kinda managed to get part of itself missing in the process.

Using TwinView+compiz+kde4.1 btw.

This is the only thing preventing me from starting using pyroom like I do writeroom on my mac :)

Revision history for this message
Adam Rooke (abelianr) wrote :

Unfortunately no people that develop pyroom have two monitors - so its almost impossible to create and test patches.

Could you try without compiz? The compiz fullscreen method was broken until recently (its still not perfect) and theres a chance that it may work using kwin instead..

Revision history for this message
Swizec (swizec) wrote :

Tried without compiz.

When I just turned it off pyroom covered all of my secondary screen and some of the primary one, but only used the distant half of secondary screen for text.

After restarting X and without compiz it did the same as usual, but on secondary screen instead of primary.

This was with the patch thingy.

I understand it's difficult for developers to fix this if they don't have two monitors and I'd help but I fear my knowledge of python is too limited and most of all I lack all skill of GUI development with python.

Revision history for this message
Kevin Wallace (kevjava) wrote :

I hacked together this patch from the bazaar repository. It launches pyroom on one monitor without blacking out the other one (blacking out the other one would require a little more effort, but is probably doable). Please test it and let me know how it works out.

Revision history for this message
Kevin Wallace (kevjava) wrote :

I should mention, I suppose that the previous patch uses the location of the mouse cursor at launch time to determine which monitor to launch itself on. I don't know whether that is standard fare or not, but if there is a better way to do it, I'd be happy to make another attempt.

Revision history for this message
Bruno Bord (brunobord) wrote :

I've been given a dual-screen at work, and could get time to test Kevin Wallace patch. It *works*! Thank you a million!

Revision history for this message
Florian Heinle (tiax) wrote :

I've just merged the branch into trunk! Thanks a lot!

Changed in pyroom:
assignee: nobody → tiax
status: In Progress → Fix Committed
Florian Heinle (tiax)
Changed in pyroom:
milestone: none → 0.3.2
Florian Heinle (tiax)
Changed in pyroom:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.