[vlc-commits] [Git][videolan/vlc][master] caca: don't keep the window locally

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Tue Jul 13 14:13:48 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
f25ace1c by Steve Lhomme at 2021-07-13T13:51:40+00:00
caca: don't keep the window locally

It's always set in vd->cfg->window

- - - - -


1 changed file:

- modules/video_output/caca.c


Changes:

=====================================
modules/video_output/caca.c
=====================================
@@ -55,7 +55,6 @@ typedef struct vout_display_sys_t {
     bool dead;
     vlc_queue_t q;
     vlc_thread_t thread;
-    vout_window_t *window;
     vout_display_place_t place;
 
     vlc_tick_t cursor_timeout;
@@ -74,7 +73,7 @@ static void *VoutDisplayEventKeyDispatch(void *data)
     vlc_caca_event_t *event;
 
     while ((event = vlc_queue_DequeueKillable(&sys->q, &sys->dead)) != NULL) {
-        vout_window_ReportKeyPress(sys->window, event->key);
+        vout_window_ReportKeyPress(vd->cfg->window, event->key);
         free(event);
     }
 
@@ -316,7 +315,7 @@ static void Manage(vout_display_t *vd)
         case CACA_EVENT_MOUSE_MOTION:
             caca_set_mouse(sys->dp, 1);
             sys->cursor_deadline = vlc_tick_now() + sys->cursor_timeout;
-            vout_window_ReportMouseMoved(sys->window,
+            vout_window_ReportMouseMoved(vd->cfg->window,
                                          caca_get_event_mouse_x(&ev),
                                          caca_get_event_mouse_y(&ev));
             break;
@@ -329,10 +328,10 @@ static void Manage(vout_display_t *vd)
             for (int i = 0; mouses[i].caca != -1; i++) {
                 if (mouses[i].caca == caca) {
                     if (caca_get_event_type(&ev) == CACA_EVENT_MOUSE_PRESS)
-                        vout_window_ReportMousePressed(sys->window,
+                        vout_window_ReportMousePressed(vd->cfg->window,
                                                        mouses[i].vlc);
                     else
-                        vout_window_ReportMouseReleased(sys->window,
+                        vout_window_ReportMouseReleased(vd->cfg->window,
                                                         mouses[i].vlc);
                     return;
                 }
@@ -340,7 +339,7 @@ static void Manage(vout_display_t *vd)
             break;
         }
         case CACA_EVENT_QUIT:
-            vout_window_ReportClose(sys->window);
+            vout_window_ReportClose(vd->cfg->window);
             break;
         default:
             break;
@@ -456,7 +455,6 @@ static int Open(vout_display_t *vd,
         goto error;
     }
 
-    sys->window = vd->cfg->window;
     const char *driver = NULL;
 #ifdef __APPLE__
     // Make sure we don't try to open a window.



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f25ace1c644a4d7a73ca90710af3f11d5ab47787

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f25ace1c644a4d7a73ca90710af3f11d5ab47787
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list