[haiku-commits] Re: r41215 - haiku/trunk/src/add-ons/input_server/devices/keyboard

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 11 Apr 2011 17:33:43 +0200


Am 11.04.2011 17:22, schrieb jonas@xxxxxxxxxxx:
+               case TM_QUIT_APPLICATION:
+               {
+                       TeamListItem* item = 
+                               fListView->CurrentSelection()));
+                       if (item != NULL) {
+                               BMessenger 
+                                       item->GetInfo()->team);
+                               messenger.SendMessage(B_QUIT_REQUESTED);
+                               UpdateList();
+                       }
+                       break;
+               }

The button is useful, but I wonder about the UpdateList() invokation. Does the list principally update live to the running applications or does it have to be invoked manually? The SendMessage() call is asynchronous, so the application will likely not have finished the request when UpdateList() runs and so this code seems either fragile or unnecessary (when BRoster events are used anyway). At the same time, it would be cool to send the message with a reply+timeout, and tell the user if the timeout has ellapsed, indicating that the application hangs (and suggesting to kill instead). What do you think?

Best regards,

Other related posts: