4c4 < --- > 12c12 < --- > 22c22 < --- > 25c25 < --- > 30c30,32 < --- > #define _MUX_STATUS 4 > #define XMUX_STATUS_NAME "XMUX_STATUS" > 33c35 < --- > 36c38 < --- > 44c46 < --- > 46,48c48 < < static char *status_name[] = { "sitting", "requesting" , "speaking" }; < --- > 53c53 < --- > 60c60 < --- > 66c66 < --- > 70c70 < --- > 83d82 < static void UpdateStatus(); 99c98 < --- > 110c109 < --- > 116c115 < --- > 125c124 < --- > 128c127 < --- > 130c129 < --- > 133,135c132 < < fprintf (stderr, "I'm user %s\n" , < mydisplayname ? mydisplayname : "NULL"); --- > 138c135 < --- > 146c143 < --- > 161c158 < --- > 163c160 < --- > 172c169 < --- > 180c177 < --- > 184c181 < --- > 191c188 < --- > 194c191 < --- > 196c193 < --- > 202c199 < --- > 208c205 < --- > 214c211 < --- > 217c214 < --- > 223c220 < --- > 232,234d228 < if (the_event.type == DestroyNotify) { < ServiceDestroyNotify(&the_event); < } 238,257c232 < < ServiceDestroyNotify(destroy_event) < < XDestroyWindowEvent *destroy_event; < < { int n; < Arg args[1]; < < if (destroy_event->window != window) { < return; < } < < DeleteAllUsers(); < < /* reset the status label */ < n = 0; < XtSetArg(args[n], XtNlabel, "Application removed! select a new one"); n++; < XtSetValues (statusLabelW, args, n); < < } --- > 262c237 < --- > 266c241 < --- > 280c255 < --- > 287c262 < --- > 302c277 < --- > 308c283 < --- > 313c288 < --- > 317c292 < --- > 323c298 < --- > 330c305 < --- > 334,335c309 < sprintf (newstatus, "S=%d|C=%d,%s", < PERSON_SITTING, True, status); --- > sprintf (newstatus, "S=%d|C=%d,%s", PERSON_SITTING, True, status); 337c311 < --- > 345c319 < --- > 357c331 < --- > 362c336 < --- > 367c341 < --- > 370c344 < --- > 378c352 < --- > 382c356 < --- > 396c370 < --- > 398c372 < --- > 403c377 < UpdateStatus (dpy, window); --- > 408c382 < --- > 422c396 < --- > 427c401 < --- > 435c409 < --- > 445c419 < --- > 449c423 < --- > 462c436 < --- > 465c439 < --- > 468c442 < --- > 472c446 < --- > 474c448 < --- > 480c454 < --- > 482c456 < --- > 486c460 < --- > 491c465 < --- > 496c470 < --- > 510c484 < --- > 522c496 < --- > 527c501 < --- > 532c506 < --- > 534c508 < --- > 536c510 < --- > 540c514 < --- > 548c522 < --- > 555c529 < --- > 557d530 < XtSetArg(args[n], XtNshapeStyle, XawShapeOval); n++; 565c538 < --- > 576c549 < --- > 580c553 < --- > 586c559 < --- > 591c564 < --- > 606c579 < --- > 615c588 < --- > 622c595 < --- > 638c611 < --- > 648c621 < --- > 665c638 < --- > 667c640 < --- > 671c644 < XSelectInput(dpy, window, PropertyChangeMask | StructureNotifyMask); --- > XSelectInput(dpy, window, PropertyChangeMask); 675c648 < --- > 688c661 < --- > 695,696c668 < XtSetArg(args[n], XtNlabel, "Not a shared < application--Choose another"); n++; --- > XtSetArg(args[n], XtNlabel, "Not a shared application--Choose another"); n++; 700c672 < --- > 702c674 < --- > 707c679 < --- > 712c684 < --- > 718c690 < --- > 723c695 < UpdateStatus (dpy, window); --- > 728c700 < --- > 734c706 < --- > 739c711 < --- > 744c716 < --- > 746c718 < --- > 749c721 < --- > 754c726 < --- > 766c738 < --- > 769,770c741 < XtSetArg(args[n], XtNlabel, "Error parsing < host/status atoms"); n++; --- > XtSetArg(args[n], XtNlabel, "Error parsing host/status atoms"); n++; 774c745 < --- > 779c750 < --- > 783c754 < --- > 786c757 < --- > 795c766 < --- > 797c768 < --- > 809c780 < --- > 812c783 < --- > 814c785 < --- > 820c791 < --- > 822c793 < --- > 830c801 < --- > 837c808 < --- > 844c815 < --- > 853c824 < --- > 857c828 < --- > 864c835 < --- > 873c844 < --- > 877c848 < --- > 884c855 < --- > 887c858 < --- > 891c862 < --- > 901c872 < --- > 904c875 < --- > 909c880 < --- > 911c882 < --- > 928c899 < --- > 935c906 < --- > 945c916 < --- > 955c926 < --- > 963c934 < --- > 986c957 < --- > 992c963 < --- > 995c966 < --- > 997c968 < --- > 1003c974 < --- > 1007c978 < --- > 1010c981 < --- > 1013c984 < --- > 1019c990 < --- > 1024d994 < UpdateStatus (dpy, window); 1026,1043c996 < < static void UpdateStatus(dpy, window) < < Display *dpy; < Window window; < < { XmuXHints mux_hints; < < XFlush (dpy); < mux_hints.type = XMUXMessage; < mux_hints.u.mess[XMUXType] = XMUXAction; < mux_hints.u.mess[XMUXSubtype] = XMUXUpdateStatus; < mux_hints.u.mess[XMUXDetail] = 0; < XmuXSetHints (dpy, window, &mux_hints); < < XmuXSetHints (dpy, window, &mux_hints); < } < --- > 1053c1006 < --- > 1056c1009 < --- > 1061c1014 < --- > 1063c1016 < --- > 1065c1018 < --- > 1068,1069c1021,1022 < < --- > > 1072c1025 < --- > 1082c1035 < --- > 1085,1086c1038,1039 < < --- > > 1091c1044 < --- > 1094c1047 < --- > 1098c1051 < --- > 1110,1111c1063 < sprintf (statusline, "User %s has the < chalk", displays[i].displayname); --- > sprintf (statusline, "User %s has the chalk", displays[i].displayname); 1120c1072 < --- >