• R/O
  • HTTP
  • SSH
  • HTTPS

master: コミット

マスターリポジトリ


コミットメタ情報

リビジョンde54eea7e98656c92db0011f9c4843d1ea90612c (tree)
日時2013-11-04 22:01:26
作者Shyouzou Sugitani <shy@user...>
コミッターShyouzou Sugitani

ログメッセージ

fix \[lock/unlock,repaint]

変更サマリ

差分

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
1+Mon November 4 2013 Shyouzou Sugitani <shy@users.sourceforge.jp>
2+ * \![lock/unlock,repaint]が機能するように修正した.
3+ (SSP同様に実行中のスクリプト内でのみ有効とした.)
4+
15 Sun November 3 2013 Shyouzou Sugitani <shy@users.sourceforge.jp>
26 * loggigモジュールへの出力をコンソールにも出すようにした.
37
--- a/lib/ninix/balloon.py
+++ b/lib/ninix/balloon.py
@@ -707,6 +707,8 @@ class BalloonWindow:
707707 return 1 if self.__shown else 0
708708
709709 def show(self):
710+ if self.request_parent('GET', 'lock_repaint'):
711+ return
710712 if self.__shown:
711713 return
712714 self.__shown = 1
@@ -828,6 +830,8 @@ class BalloonWindow:
828830 return text
829831
830832 def redraw(self, widget, cr):
833+ if self.request_parent('GET', 'lock_repaint'):
834+ return
831835 if not self.__shown:
832836 return True
833837 assert self.balloon_surface is not None
--- a/lib/ninix/sakura.py
+++ b/lib/ninix/sakura.py
@@ -168,6 +168,7 @@ class Sakura:
168168 def handle_request(self, event_type, event, *arglist, **argdict):
169169 assert event_type in ['GET', 'NOTIFY']
170170 handlers = {
171+ 'lock_repaint': self.get_lock_repaint
171172 }
172173 handler = handlers.get(event, getattr(self, event, None))
173174 if handler is None:
@@ -178,6 +179,9 @@ class Sakura:
178179 if event_type == 'GET':
179180 return result
180181
182+ def get_lock_repaint(self):
183+ return self.lock_repaint
184+
181185 def attach_observer(self, observer):
182186 if observer not in self.__observers:
183187 self.__observers[observer] = 1
@@ -2275,6 +2279,7 @@ class Sakura:
22752279 self.script_position = 0
22762280 self.time_critical_session = 0
22772281 self.quick_session = 0
2282+ self.lock_repaint = 0 # SSP compat
22782283 self.set_synchronized_session(reset=1)
22792284 self.balloon.set_autoscroll(True)
22802285 self.reset_idle_time()
--- a/lib/ninix/surface.py
+++ b/lib/ninix/surface.py
@@ -910,6 +910,7 @@ class SurfaceWindow:
910910 "{},{},{},{}".format(self.side, self.surface_id, w, h),
911911 "{}".format(prev_id),
912912 "{},{},{},{}".format(new_x, new_y, new_x + w, new_y + h))
913+ self.update_frame_buffer() #XXX
913914
914915 def iter_mayuna(self, surface_width, surface_height, mayuna, done):
915916 for surface_id, interval, method, args in mayuna.patterns:
@@ -1046,6 +1047,8 @@ class SurfaceWindow:
10461047 return surface
10471048
10481049 def update_frame_buffer(self):
1050+ if self.request_parent('GET', 'lock_repaint'):
1051+ return
10491052 new_surface = self.create_image_surface(self.seriko.base_id)
10501053 assert new_surface is not None
10511054 # update collision areas
@@ -1098,6 +1101,8 @@ class SurfaceWindow:
10981101 self.seriko.add_overlay(self, actor, surface_id, x, y, method)
10991102
11001103 def move_surface(self, xoffset, yoffset):
1104+ if self.request_parent('GET', 'lock_repaint'):
1105+ return
11011106 x, y = self.get_position()
11021107 self.window.move(x + xoffset, y + yoffset)
11031108 if self.side < 2:
@@ -1168,6 +1173,8 @@ class SurfaceWindow:
11681173 return centerx, centery
11691174
11701175 def set_position(self, x, y):
1176+ if self.request_parent('GET', 'lock_repaint'):
1177+ return
11711178 self.position = (x, y)
11721179 new_x, new_y = self.get_position()
11731180 self.window.move(new_x, new_y)
@@ -1226,6 +1233,8 @@ class SurfaceWindow:
12261233 return self.__shown
12271234
12281235 def show(self):
1236+ if self.request_parent('GET', 'lock_repaint'):
1237+ return
12291238 if self.__shown:
12301239 return
12311240 self.__shown = True
旧リポジトリブラウザで表示