Re: Capturing Events in Vte::Terminal



Murray Cumming wrote:
> On Tue, 2009-03-10 at 09:18 +1100, Grizzly(Francis Smit) wrote:
>   
>> hi  I have a problem I want to capture mouse clicks
>> in  Vte::Terminal but I cannot get it to catch the mouse, my code looks
>> like so
>>
>>         m_term->add_events(Gdk::BUTTON_PRESS_MASK);
>>         m_term->signal_button_press_event().
>>             connect(sigc::mem_fun(*this, &MainWin::OnButtonPressEvent)
>> );                                                                  
>>  m_term->show();                     
>>         m_scrolledwindowone->show_all_children();
>>     
>
> You generally need to connect "before" with X event signals:
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/apbs06.html
>
>   
Thanks Murray that did it I changed my code to
m_term->signal_button_press_event().
      connect(sigc::mem_fun(*this, &MainWin::OnButtonPressEvent),
false);   

and the extra false parameter did it!! and the

m_term->add_events(Gdk::BUTTON_PRESS_MASK); wasn't needed cool 



-- 
  In my life God comes first.... but Linux is pretty high after that :-D
Grizzly(Francis Smit)
http://www.geekcode.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/P/PA d- s+:+> a+>? C++++ UL++++@ P+ L+++ E--- W+++ N+(++) K w--- M-- V-- PS(+) PE(-) Y+(++) PGP++ t+(++) 5 X- R- tv b+++(++++) DI(--) D G e++(+++) h-- r- y-
------END GEEK CODE BLOCK------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]