projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Andrew fixed Attach Transitions and added english tips
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
remotecontrol.C
diff --git
a/cinelerra-5.1/cinelerra/remotecontrol.C
b/cinelerra-5.1/cinelerra/remotecontrol.C
index bb61eb277011e5c2508aef06cb0d680917bb84eb..457d331395e8bf91d7462518851e211d78ea77fa 100644
(file)
--- a/
cinelerra-5.1/cinelerra/remotecontrol.C
+++ b/
cinelerra-5.1/cinelerra/remotecontrol.C
@@
-53,11
+53,13
@@
RemoteControl::~RemoteControl()
int RemoteControl::activate(RemoteHandler *handler)
{
int result = 0;
int RemoteControl::activate(RemoteHandler *handler)
{
int result = 0;
-
active_lock->lock("RemoteControl::activate"
);
- if( !
is_active() ) {
-
if( !handler )
handler = !mwindow_gui->record->running() ?
+
deactivate(
);
+ if( !
handler )
+ handler = !mwindow_gui->record->running() ?
(RemoteHandler *)mwindow_gui->cwindow_remote_handler :
(RemoteHandler *)mwindow_gui->record_remote_handler ;
(RemoteHandler *)mwindow_gui->cwindow_remote_handler :
(RemoteHandler *)mwindow_gui->record_remote_handler ;
+ active_lock->lock("RemoteControl::activate");
+ if( handler ) {
gui->lock_window("RemoteControl::activate");
gui->set_active(handler);
gui->set_color(handler->color);
gui->lock_window("RemoteControl::activate");
gui->set_active(handler);
gui->set_color(handler->color);
@@
-72,19
+74,21
@@
int RemoteControl::activate(RemoteHandler *handler)
int RemoteControl::deactivate()
{
int result = 0;
int RemoteControl::deactivate()
{
int result = 0;
- active_lock->lock("RemoteControl::deactivate");
if( is_active() ) {
if( is_active() ) {
- gui->set_inactive();
- result = 1;
+ active_lock->lock("RemoteControl::deactivate");
+ if( is_active() ) {
+ gui->set_inactive();
+ result = 1;
+ }
+ active_lock->unlock();
}
}
- active_lock->unlock();
return result;
}
int RemoteControl::remote_key(int key)
{
if( !is_active() ) return 0;
return result;
}
int RemoteControl::remote_key(int key)
{
if( !is_active() ) return 0;
- return handler->remote_
process_key(this,
key);
+ return handler->remote_
key(
key);
}
void RemoteControl::set_color(int color)
}
void RemoteControl::set_color(int color)
@@
-172,8
+176,7
@@
int RemoteGUI::keypress_event()
return result;
}
return result;
}
-RemoteHandler::
-RemoteHandler(RemoteGUI *gui, int color)
+RemoteHandler::RemoteHandler(RemoteGUI *gui, int color)
{
this->gui = gui;
this->color = color;
{
this->gui = gui;
this->color = color;
@@
-183,4
+186,14
@@
RemoteHandler::~RemoteHandler()
{
}
{
}
+int RemoteHandler::remote_key(int key)
+{
+ gui->set_inactive();
+ return -1;
+}
+
+int RemoteHandler::process_key(int key)
+{
+ return -1;
+}