Skip to content

Commit

Permalink
#2539 don't enable on macos (no workee..), minor cleanups
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@26333 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed May 12, 2020
1 parent ae8ff8b commit f6e82f5
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/xpra/client/gtk3/gtk3_client_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
from xpra.client.gtk3.window_menu import WindowMenuHelper
from xpra.gtk_common.gtk_util import WINDOW_NAME_TO_HINT
from xpra.util import envbool
from xpra.os_util import bytestostr, is_gnome
from xpra.os_util import bytestostr, is_gnome, OSX
from xpra.log import Logger

log = Logger("gtk", "window")
paintlog = Logger("paint")
metalog = Logger("metadata")
geomlog = Logger("geometry")
Expand All @@ -34,9 +33,9 @@
Gdk.WindowTypeHint.DND)


WINDOW_ICON = envbool("XPRA_WINDOW_ICON", True)
WINDOW_ICON = envbool("XPRA_WINDOW_ICON", not OSX)
WINDOW_XPRA_MENU = envbool("XPRA_WINDOW_XPRA_MENU", is_gnome())
WINDOW_MENU = envbool("XPRA_WINDOW_MENU", True)
WINDOW_MENU = envbool("XPRA_WINDOW_MENU", not OSX)


"""
Expand All @@ -49,7 +48,8 @@ class GTK3ClientWindow(GTKClientWindowBase):

def init_window(self, metadata):
super().init_window(metadata)
if (WINDOW_MENU or WINDOW_ICON) and self.get_decorated() and not self.is_OR():
self.header_bar_image = None
if (WINDOW_MENU or WINDOW_XPRA_MENU or WINDOW_ICON) and self.get_decorated() and not self.is_OR():
self.add_header_bar()

def _resize_pixbuf(self, pixbuf):
Expand All @@ -63,8 +63,9 @@ def _resize_pixbuf(self, pixbuf):

def set_icon(self, pixbuf):
super().set_icon(pixbuf)
if WINDOW_ICON:
self.header_bar_image.set_from_pixbuf(self._resize_pixbuf(pixbuf))
hbi = self.header_bar_image
if hbi:
hbi.set_from_pixbuf(self._resize_pixbuf(pixbuf))

def add_header_bar(self):
self.menu_helper = WindowMenuHelper(self._client, self)
Expand Down

0 comments on commit f6e82f5

Please sign in to comment.