Skip to content

Commit

Permalink
#751: missed from r8204, expose workareas in screen info
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@8205 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 5, 2014
1 parent 8d80a01 commit 7c2faf4
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/xpra/client/gtk_base/gtk_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from xpra.client.gtk_base.gtk_keyboard_helper import GTKKeyboardHelper
from xpra.client.gtk_base.session_info import SessionInfo
from xpra.platform.paths import get_icon_filename
from xpra.platform.gui import system_bell, get_workarea, get_fixed_cursor_size
from xpra.platform.gui import system_bell, get_workarea, get_workareas, get_fixed_cursor_size

missing_cursor_names = set()

Expand Down Expand Up @@ -236,6 +236,14 @@ def get_screen_sizes(self):
screen = display.get_screen(i)
j = 0
monitors = []
workareas = []
#native "get_workareas()" is only valid for a single screen (but describes all the monitors)
#and it is only implemented on win32 right now
#other platforms only implement "get_workarea()" instead, which is reported against the screen
if display.get_n_screens()==1:
workareas = get_workareas()
if len(workareas)!=screen.get_n_monitors():
workareas = []
while j<screen.get_n_monitors():
geom = screen.get_monitor_geometry(j)
plug_name = ""
Expand All @@ -247,8 +255,11 @@ def get_screen_sizes(self):
hmm = -1
if hasattr(screen, "get_monitor_height_mm"):
hmm = screen.get_monitor_height_mm(j)
monitor = plug_name, geom.x, geom.y, geom.width, geom.height, wmm, hmm
monitors.append(monitor)
monitor = [plug_name, geom.x, geom.y, geom.width, geom.height, wmm, hmm]
if workareas:
w = workareas[j]
monitor += list(w)
monitors.append(tuple(monitor))
j += 1
work_x, work_y = 0, 0
work_width, work_height = screen.get_width(), screen.get_height()
Expand Down

0 comments on commit 7c2faf4

Please sign in to comment.