- TranslateMessage( &msg );
- DispatchMessageA (&msg);
-
- /* handle window creation requests, destroy requests,
- and run idle callbacks
- */
-
- if( msg.message == WM_TIMER ) {
- pthread_mutex_lock (&plugin_mutex);
-again:
- for (fst = fst_first; fst; fst = fst->next) {
-
- if (fst->destroy) {
- if (fst->window) {
- fst->plugin->dispatcher( fst->plugin, effEditClose, 0, 0, NULL, 0.0 );
- CloseWindow (fst->window);
- fst->window = NULL;
- fst->destroy = FALSE;
- }
- fst_event_loop_remove_plugin (fst);
- fst->been_activated = FALSE;
- pthread_mutex_lock (&fst->lock);
- pthread_cond_signal (&fst->window_status_change);
- pthread_mutex_unlock (&fst->lock);
- goto again;
- }
-
- if (fst->window == NULL) {
- pthread_mutex_lock (&fst->lock);
- if (fst_create_editor (fst)) {
- fst_error ("cannot create editor for plugin %s", fst->handle->name);
- fst_event_loop_remove_plugin (fst);
- pthread_cond_signal (&fst->window_status_change);
- pthread_mutex_unlock (&fst->lock);
- goto again;
- }
- /* condition/unlock handled when we receive WM_ACTIVATE */
- }
+ // This is the suggested order of calls.
+ fst->plugin->dispatcher (fst->plugin, effEditGetRect, 0, 0, &er, 0 );
+ fst->plugin->dispatcher (fst->plugin, effEditOpen, 0, 0, fst->windows_window, 0 );
+ fst->plugin->dispatcher (fst->plugin, effEditGetRect, 0, 0, &er, 0 );