From 919dbb234fcb49d3d414ea3962ddb6bbe44936a0 Mon Sep 17 00:00:00 2001 From: Gobinath Date: Wed, 19 Apr 2017 10:18:27 -0400 Subject: [PATCH] Fix break screen only on one monitor --- safeeyes/BreakScreen.py | 25 +++++++----------- safeeyes/Plugins.py | 4 +-- .../resource/short_break_rotate_clockwise.png | Bin 2185 -> 1634 bytes .../short_break_rotate_counter_clockwise.png | Bin 2256 -> 1634 bytes 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/safeeyes/BreakScreen.py b/safeeyes/BreakScreen.py index 6f7ca12..bf67390 100644 --- a/safeeyes/BreakScreen.py +++ b/safeeyes/BreakScreen.py @@ -139,21 +139,6 @@ class BreakScreen: lbl_right = builder.get_object("lbl_right") img_break = builder.get_object("img_break") - window.move(x, y) - - self.windows.append(window) - self.count_labels.append(lbl_count) - - # Set visual to apply css theme. It should be called before show method. - window.set_visual(window.get_screen().get_rgba_visual()) - - window.stick() - window.set_keep_above(True) - window.present() - window.set_position(Gtk.WindowPosition.CENTER_ALWAYS) - window.resize(monitor_gemoetry.width, monitor_gemoetry.height) - window.fullscreen() - # Set values if image_path: img_break.set_from_file(image_path) @@ -167,7 +152,17 @@ class BreakScreen: btn_postpone.set_visible(not self.strict_break) btn_skip.set_visible(not self.strict_break) + self.windows.append(window) + self.count_labels.append(lbl_count) + + # Set visual to apply css theme. It should be called before show method. + window.set_visual(window.get_screen().get_rgba_visual()) + + window.move(x, y) + window.stick() + window.set_keep_above(True) window.present() + window.fullscreen() """ diff --git a/safeeyes/Plugins.py b/safeeyes/Plugins.py index 559125c..2546d7c 100644 --- a/safeeyes/Plugins.py +++ b/safeeyes/Plugins.py @@ -82,7 +82,7 @@ class Plugins: Returns: {'left': 'Markup of plugins to be aligned on left', 'right': 'Markup of plugins to be aligned on right' } """ context = copy.deepcopy(context) # If plugins change the context, it should not affect Safe Eyes - output = {'left': '', 'right': ''} + output = {'left': ' \n', 'right': ' \n'} multiple_results = [self.__thread_pool.apply_async(plugin['module'].pre_break, (context,)) for plugin in self.__plugins] for i in range(len(multiple_results)): try: @@ -96,7 +96,7 @@ class Plugins: output[self.__plugins[i]['location']] += (result + '\n\n') except Exception: # Something went wrong in the plugin - raise + logging.warning('Error when executing the plugin ' + self.__plugins[i]['name']) return output diff --git a/safeeyes/resource/short_break_rotate_clockwise.png b/safeeyes/resource/short_break_rotate_clockwise.png index 475139d45bb2cfe1866f229f950ae45ba2f71872..09712227c2bc9869674226b3bb323c1aa99d2baa 100644 GIT binary patch delta 1452 zcmV;d1ylNo5#kJxBnYlhOjJbx005COqme)ee=UmiDgXcgIdoD^Qvd}{`V0v40u$-+ zLm?Zp{Lggc+t<^`q>uOPlYVihw34G`Ro( z1u98IK~#9!?AY6G;xG^f;6LO<2!s$0p}Cj8eSdMT8C87Zh`7V9!YRqRKpyQq{ayq2zAP!cV};h(3|yi%F;Da(#ME+ zPu_96t|O+tc8_ljN--{%c>Lj8vrZEkf6f=rp?kp!(q6c&`z~@sdoB<^An8C!?V1Jw z+A^Rd$AkpCM+t)!ghe4GSS|`X=@hqHqLAiY_%lGE+(#;$X*z5wlp;8}ovqd(R zv;$OZ&JMvA2$XK1Y6F(s$WW)7Cd#vs)Xx3&vBc{w)!;cc(yZyK2PNKf%F&Fjo}q-s z+Eo+0sC*YI{>*G1rQit4upmE5e}NY$qw!JZ)ASeAVfQe=oikmXp^%wbkT+~;DzSF6 zn^mS(P>EeN-A0_t7N(e&ehpuxyAb(XfVc+xRGF9Bx7)-)-@B_!6?@ zP)DOQOMKbvM(i0CGI@1V(_QXL6f33+icN&ux zL>P2$3TgI`;)XT^_;kmR-@ZdhPD^6$H;1gXMfa>V^7ScBhb+S)o@Ep*MmxyrQJNm| zQCtK`HA+`Qu1zHYa44N4(ho2TNOCEQi(DaHH6UwDS;j?1Knuv~Q9=xkzo98-)@`J1cCqnFTx2DUJPgu9Z;i=wQ1C7 zjPC#cW1VKESrA${@78|l^U)axKHS~D+_Gj}gw^wSR%uQ++}n^$Ym(0n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