From 72996466cf220abe1dcacf60c64e182dd8233763 Mon Sep 17 00:00:00 2001 From: gryf Date: Mon, 18 Apr 2022 19:13:16 +0200 Subject: [PATCH] Moved open_xwindow from helpers to base class. --- wmdocklib/__init__.py | 8 ++++++++ wmdocklib/helpers.py | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/wmdocklib/__init__.py b/wmdocklib/__init__.py index e59d054..0c0c814 100644 --- a/wmdocklib/__init__.py +++ b/wmdocklib/__init__.py @@ -50,6 +50,14 @@ class DockApp: self.redraw() time.sleep(0.3) + def open_xwindow(self): + """Open the X window of given width and height. + + The XBM mask is here created from the upper left rectangle of the + XPM using the given width and height.""" + pywmgeneral.open_xwindow(len(sys.argv), sys.argv, self.width, + self.height) + def prepare_pixmaps(self, background=None, patterns=None, style='3d', margin=3): diff --git a/wmdocklib/helpers.py b/wmdocklib/helpers.py index 1da738b..676cdfd 100644 --- a/wmdocklib/helpers.py +++ b/wmdocklib/helpers.py @@ -283,14 +283,6 @@ def init_pixmap(background=None, patterns=None, style='3d', width=64, return char_width, char_height, charset_start, charset_width -def open_xwindow(argv, w, h): - """Open the X window of given width and height. - - The XBM mask is here created from the upper left rectangle of the - XPM using the given width and height.""" - pywmgeneral.open_xwindow(len(argv), argv, w, h) - - def redraw(): """Redraw the window.""" pywmgeneral.redraw_window()