Skip to content

Commit

Permalink
#980:
Browse files Browse the repository at this point in the history
* force send a configure packet rather than re-creating the window
* make this per-platform (enabled on osx and win32)
* allow the env var to override platform setting

git-svn-id: https://xpra.org/svn/Xpra/trunk@10608 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Sep 11, 2015
1 parent 5094347 commit 3898d52
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/xpra/client/client_tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ def get_tray_geometry(self):
def get_tray_size(self):
return self.tray_widget.get_size()


def send_configure(self):
self.reconfigure(True)

def reconfigure(self, force_send_configure=False):
geometry = self.tray_widget.get_geometry()
log("%s.reconfigure(%s) geometry=%s", self, force_send_configure, geometry)
Expand Down
3 changes: 3 additions & 0 deletions src/xpra/client/gtk_base/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,9 @@ def get_window_frame_size(self):
return frame


def send_configure(self):
self.process_configure_event()

def do_configure_event(self, event):
eventslog("%s.do_configure_event(%s)", self, event)
gtk.Window.do_configure_event(self, event)
Expand Down
11 changes: 7 additions & 4 deletions src/xpra/client/ui_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from xpra.client.client_base import XpraClientBase, EXIT_TIMEOUT, EXIT_MMAP_TOKEN_FAILURE
from xpra.client.client_tray import ClientTray
from xpra.client.keyboard_helper import KeyboardHelper
from xpra.platform.features import MMAP_SUPPORTED, SYSTEM_TRAY_SUPPORTED, CLIPBOARD_WANT_TARGETS, CLIPBOARD_GREEDY, CLIPBOARDS
from xpra.platform.features import MMAP_SUPPORTED, SYSTEM_TRAY_SUPPORTED, CLIPBOARD_WANT_TARGETS, CLIPBOARD_GREEDY, CLIPBOARDS, REINIT_WINDOWS
from xpra.platform.gui import (ready as gui_ready, get_vrefresh, get_antialias_info, get_double_click_time, show_desktop,
get_double_click_distance, get_native_notifier_classes, get_native_tray_classes, get_native_system_tray_classes,
get_native_tray_menu_helper_classes, get_dpi, get_xdpi, get_ydpi, get_number_of_desktops, get_desktop_names, ClientExtras)
Expand All @@ -61,7 +61,7 @@
PING_TIMEOUT = int(os.environ.get("XPRA_PING_TIMEOUT", "60"))
UNGRAB_KEY = os.environ.get("XPRA_UNGRAB_KEY", "Escape")

REINIT_WINDOWS = os.environ.get("XPRA_MONITOR_CHANGE_REINIT", "0")=="1"
MONITOR_CHANGE_REINIT = os.environ.get("XPRA_MONITOR_CHANGE_REINIT")

AV_SYNC_DELTA = int(os.environ.get("XPRA_AV_SYNC_DELTA", "0"))
MOUSE_ECHO = os.environ.get("XPRA_MOUSE_ECHO", "0")=="1"
Expand Down Expand Up @@ -734,9 +734,12 @@ def screen_size_changed(self, *args):

def do_process_screen_size_change(self):
self.update_screen_size()
if REINIT_WINDOWS:
if MONITOR_CHANGE_REINIT and MONITOR_CHANGE_REINIT=="0":
return
if MONITOR_CHANGE_REINIT or REINIT_WINDOWS:
screenlog.info("screen size change: will reinit the windows")
self.reinit_windows()
for window in self._id_to_window.values():
window.send_configure()


def update_screen_size(self):
Expand Down
1 change: 1 addition & 0 deletions src/xpra/platform/darwin/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# later version. See the file COPYING for details.

SYSTEM_TRAY_SUPPORTED = True
REINIT_WINDOWS = True

CLIPBOARDS=["CLIPBOARD"]
CLIPBOARD_WANT_TARGETS = True
Expand Down
2 changes: 2 additions & 0 deletions src/xpra/platform/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
CAN_DAEMONIZE = True
MMAP_SUPPORTED = True
SYSTEM_TRAY_SUPPORTED = False
REINIT_WINDOWS = False

CLIPBOARDS = []
CLIPBOARD_WANT_TARGETS = False
Expand Down Expand Up @@ -46,6 +47,7 @@
"CAN_DAEMONIZE",
"MMAP_SUPPORTED",
"SYSTEM_TRAY_SUPPORTED",
"REINIT_WINDOWS",
"DEFAULT_ENV",
"DEFAULT_SSH_COMMAND",
"DEFAULT_PULSEAUDIO_COMMAND",
Expand Down
1 change: 1 addition & 0 deletions src/xpra/platform/win32/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
CAN_DAEMONIZE = False
MMAP_SUPPORTED = False
SYSTEM_TRAY_SUPPORTED = True
REINIT_WINDOWS = True

GOT_PASSWORD_PROMPT_SUGGESTION = \
'Perhaps you need to set up Pageant, or (less secure) use --ssh="plink -pw YOUR-PASSWORD"?\n'
Expand Down

0 comments on commit 3898d52

Please sign in to comment.