Fixed a bug that caused the first table to be focussed even when it was minimized...
authorterminatorX <>
Mon, 16 Jun 2003 18:55:37 +0000 (18:55 +0000)
committerterminatorX <>
Mon, 16 Jun 2003 18:55:37 +0000 (18:55 +0000)
src/tX_mouse.cc
src/tX_vtt.cc

index df71f9a3e5d297a2846628057fe75a89602b71d0..e187bfb5a83adbf54c0524d1da860133fa01788e 100644 (file)
@@ -133,7 +133,20 @@ int tx_mouse :: grab() {
        otime=CurrentTime;
        
        grabbed=1;
-       vtt_class::focus_no(0);
+       
+       std::list<vtt_class *> :: iterator v;
+       int c=0;
+       
+       for (v=vtt_class::main_list.begin(); v!=vtt_class::main_list.end(); v++) {
+               if (!(*v)->audio_hidden) {
+                       vtt_class::focus_no(c);
+                       break;
+               }
+               c++;
+               //vtt_class::focus_no(0);
+       }
+       
+       
        warp=TX_MOUSE_SPEED_NORMAL;
        
        tX_debug("tX_mouse::grab(): this: %08x, dpy: %08x", (int) this, (int) dpy);
index cfd788ea15781a16c82cc7b4e3e40e0bd16e9498..c5000aef7917621cb84d420fd1a66dc98995cc3c 100644 (file)
@@ -1208,10 +1208,11 @@ void vtt_class :: focus_no(int no)
        list <vtt_class *> :: iterator vtt;
        int i;
 
+       focused_vtt=NULL;
+       
        for (i=0, vtt=main_list.begin(); vtt!=main_list.end(); vtt++, i++)
        {
-               if (i==no)
-               {
+               if (i==no) {
                        focused_vtt=(*vtt);
                }
        }