Ticket #201 (new defect)

Opened 2 years ago

Last modified 3 months ago

Terminal appears on wrong monitor if primary screen is right of secondary one

Reported by: maweaver Owned by: somebody
Priority: Fix available Milestone: 0.5.0
Component: guake Version:
Keywords: Cc:

Description

get_final_window_rect, assumes window_rect.x is 0, which may not always be the case. If the starting X coordinate is > 0 it gets reset to 0 by the calculations. The X coordinates should be added to, not set directly:

if halignment == ALIGN_CENTER:

window_rect.x += (total_width - window_rect.width) / 2

if halignment == ALIGN_LEFT:

window_rect_x += 0

elif halignment == ALIGN_RIGHT:

window_rect.x += total_width - window_rect.width

Attachments

Change History

Changed 2 years ago by maweaver

Sorry I created a typo in my fix. The only change should have been changing the '=' to '+='s, and the fourth line should read

window_rect.x += 0

not

window_rect_x += 0

Changed 2 years ago by pingou

It would be nice if you could provide a git format-patch for your patch :-)

Thanks for contributing

Changed 2 years ago by maweaver

Hopefully I did that right, I'm not too familiar with git.

Changed 21 months ago by emanuelez

I tried changing the file manually on my machine according to the patch and it seems to work fine. Release it soon! :)

Changed 18 months ago by sh_sh

Thx for the patch, much appreciated :]

Changed 3 months ago by pabloab

If just like me someone want to have guake on the second screen, change the hardcoded "0" to "1" on:

# get the rectangle just from the first/default monitor in the
# future we might create a field to select which monitor you
# wanna use
window_rect = screen.get_monitor_geometry(0)
Note: See TracTickets for help on using tickets.