[vlc-devel] commit: Cosmetics (msw). (Laurent Aimar )

git version control git at videolan.org
Tue Jan 5 21:07:22 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Dec 26 20:21:52 2009 +0100| [72974fc1b09b63d92570e45cc0c2fd6ebca57c3e] | committer: Laurent Aimar 

Cosmetics (msw).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=72974fc1b09b63d92570e45cc0c2fd6ebca57c3e
---

 modules/video_output/msw/common.c |   19 ++++++++++---------
 modules/video_output/msw/events.c |    9 +++++----
 modules/video_output/msw/events.h |    2 +-
 3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/modules/video_output/msw/common.c b/modules/video_output/msw/common.c
index 196af7f..d78a4ae 100644
--- a/modules/video_output/msw/common.c
+++ b/modules/video_output/msw/common.c
@@ -252,6 +252,12 @@ void UpdateRects(vout_display_t *vd,
     RECT  rect;
     POINT point;
 
+    /* */
+    if (!cfg)
+        cfg = vd->cfg;
+    if (!source)
+        source = &vd->source;
+
     /* Retrieve the window size */
     GetClientRect(sys->hwnd, &rect);
 
@@ -260,19 +266,14 @@ void UpdateRects(vout_display_t *vd,
     ClientToScreen(sys->hwnd, &point);
 
     /* If nothing changed, we can return */
-    bool has_changed;
-    EventThreadUpdateWindowPosition(sys->event, &has_changed,
+    bool has_moved;
+    bool is_resized;
+    EventThreadUpdateWindowPosition(sys->event, &has_moved, &is_resized,
                                     point.x, point.y,
                                     rect.right, rect.bottom);
-    if (!is_forced && !has_changed)
+    if (!is_forced && !has_moved && !is_resized)
         return;
 
-    /* */
-    if (!cfg)
-        cfg = vd->cfg;
-    if (!source)
-        source = &vd->source;
-
     /* Update the window position and size */
     vout_display_cfg_t place_cfg = *cfg;
     place_cfg.display.width  = rect.right;
diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c
index fbe539e..36e10a3 100644
--- a/modules/video_output/msw/events.c
+++ b/modules/video_output/msw/events.c
@@ -927,13 +927,14 @@ int EventThreadGetWindowStyle( event_thread_t *p_event )
     return p_event->i_window_style;
 }
 
-void EventThreadUpdateWindowPosition( event_thread_t *p_event, bool *pb_changed,
+void EventThreadUpdateWindowPosition( event_thread_t *p_event,
+                                      bool *pb_moved, bool *pb_resized,
                                       int x, int y, int w, int h )
 {
     vlc_mutex_lock( &p_event->lock );
-    *pb_changed = x != p_event->wnd_cfg.x ||
-                  y != p_event->wnd_cfg.y ||
-                  w != p_event->wnd_cfg.width ||
+    *pb_moved   = x != p_event->wnd_cfg.x ||
+                  y != p_event->wnd_cfg.y;
+    *pb_resized = w != p_event->wnd_cfg.width ||
                   h != p_event->wnd_cfg.height;
 
     p_event->wnd_cfg.x      = x;
diff --git a/modules/video_output/msw/events.h b/modules/video_output/msw/events.h
index 80eb9b6..43828f4 100644
--- a/modules/video_output/msw/events.h
+++ b/modules/video_output/msw/events.h
@@ -53,7 +53,7 @@ void            EventThreadMouseAutoHide( event_thread_t * );
 void            EventThreadMouseShow( event_thread_t * );
 void            EventThreadUpdateTitle( event_thread_t *, const char *psz_fallback );
 int             EventThreadGetWindowStyle( event_thread_t * );
-void            EventThreadUpdateWindowPosition( event_thread_t *, bool *pb_changed,
+void            EventThreadUpdateWindowPosition( event_thread_t *, bool *pb_moved, bool *pb_resized,
                                                  int x, int y, int w, int h );
 void            EventThreadUpdateSourceAndPlace( event_thread_t *p_event,
                                                  const video_format_t *p_source,




More information about the vlc-devel mailing list