Ticket #33289: pmg_tk_platform.patch

File pmg_tk_platform.patch, 2.0 KB (added by howarth@…, 13 years ago)

allow darwin to use same X11 wm fixes for pmw as linux2

  • modules/pmg_tk/skins/normal/__init__.py

    old new  
    250250        self.buttonArea.destroy()
    251251
    252252    def my_show(self,win,center=1):
    253         if sys.platform!='linux2':
     253        if (sys.platform!='linux2') and (sys.platform!='darwin'):
    254254            win.show()
    255255        else: # autocenter, deiconify, and run mainloop
    256256            # this is a workaround for a bug in the
     
    269269#         win.show()
    270270           
    271271    def my_withdraw(self,win):
    272         if sys.platform!='linux2':
     272        if (sys.platform!='linux2') or (sys.platform!='darwin'):
    273273            win.withdraw()
    274274        else:
    275275            win.destroy()
    276276
    277277    def my_activate(self,win,center=1,focus=None):
    278         if sys.platform!='linux2':
     278        if (sys.platform!='linux2') and (sys.platform!='darwin'):
    279279            win.activate()
    280280        else: # autocenter, deiconify, and run mainloop
    281281            # this is a workaround for a bug in the
     
    296296            win.mainloop()
    297297           
    298298    def my_deactivate(self,win):
    299         if sys.platform!='linux2':
     299        if (sys.platform!='linux2') or (sys.platform!='darwin'):
    300300            win.deactivate()
    301301        else: # autocenter, deiconify, and run mainloop
    302302            win.destroy()
  • modules/pmg_tk/PMGApp.py

    old new  
    219219
    220220
    221221    def my_show(self,win,center=1):
    222         if sys.platform!='linux2':
     222        if (sys.platform!='linux2') and (sys.platform!='darwin'):
    223223            win.show()
    224224        else: # autocenter, deiconify, and run mainloop
    225225            # this is a workaround for a bug in the
     
    237237            win.deiconify()
    238238
    239239    def my_withdraw(self,win):
    240         if sys.platform!='linux2':
     240        if (sys.platform!='linux2') or (sys.platform!='darwin'):
    241241            win.withdraw()
    242242        else:
    243243            win.destroy()