Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 317049 Details for
Bug 462678
Applications does grab without doing ungrab, locking the display
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Test program to trigger the bug
motifhang.c (text/plain), 3.24 KB, created by
Göran Uddeborg
on 2008-09-18 08:44:12 UTC
(
hide
)
Description:
Test program to trigger the bug
Filename:
MIME Type:
Creator:
Göran Uddeborg
Created:
2008-09-18 08:44:12 UTC
Size:
3.24 KB
patch
obsolete
>#include <stdlib.h> >#include <unistd.h> > >#include <Xm/Xm.h> >#include <Xm/Form.h> >#include <Xm/PushB.h> >#include <Xm/RowColumn.h> >#include <Xm/Frame.h> >#include <Xm/CascadeB.h> > >const char *TRIGGER_HANG = >"1. Press the File->Delay menu.\n" >"2. Within 5 seconds, press the File menu button exactly twice.\n" >"3. After 5 seconds, click the Click button.\n" >"Now the display is locked by a grab.\n"; > >XtAppContext context; >XmStringCharSet char_set=XmSTRING_DEFAULT_CHARSET; > >Widget toplevel, form, menu_bar, click, file_menu, open_item, quit_item; > >/* callback routine used for all menus */ >void menuCB(Widget w,char* client_data,XmAnyCallbackStruct *call_data) >{ > if (strcmp(client_data, "Quit") == 0) > exit(0); > if (strcmp(client_data, "Delay") == 0) { > printf("Working...\n"); > sleep(5); // Press the File menu twice during this sleep > printf("Done\n"); > } >} > >/* adds an item into a menu. */ >Widget make_menu_item(char* item_name, caddr_t client_data, Widget menu) >{ > int ac; > Arg al[10]; > Widget item; > > ac = 0; > XtSetArg(al[ac], XmNlabelString, XmStringCreateLtoR(item_name, char_set)); ac++; > item = XmCreatePushButton(menu, item_name, al, ac); > XtManageChild(item); > XtAddCallback(item, XmNactivateCallback, (void (*)(Widget, void*, void*))menuCB, client_data); > XtSetSensitive(item, True); > return(item); >} > >/* creates a menu on the menu bar */ >Widget make_menu(char* menu_name, Widget menu_bar) >{ > int ac; > Arg al[10]; > Widget menu, cascade; > > menu = XmCreatePulldownMenu(menu_bar, menu_name, NULL, 0); > ac = 0; > XtSetArg(al[ac], XmNsubMenuId, menu); ac++; > XtSetArg(al[ac], XmNlabelString, XmStringCreateLtoR(menu_name, char_set)); ac++; > cascade = XmCreateCascadeButton(menu_bar, menu_name, al, ac); > XtManageChild(cascade); > return(menu); >} > >/* creates all the menus for this program */ >void create_menus(Widget menu_bar) >{ > /* create the file menu */ > file_menu = make_menu("File", menu_bar); > open_item = make_menu_item("Delay", "Delay", file_menu); > quit_item = make_menu_item("Quit", "Quit", file_menu); >} > >int main(int argc, char* argv[]) >{ > Arg al[10]; > int ac; > > printf(TRIGGER_HANG); > > /* create the toplevel shell */ > toplevel = XtAppInitialize(&context, "" , NULL, 0, &argc, argv, NULL, NULL, 0); > > /* create a form widget */ > ac = 0; > form = XmCreateForm(toplevel, "form", al, ac); > XtManageChild(form); > > /* create the menu bar */ > ac = 0; > menu_bar = XmCreateMenuBar(form, "menu_bar", al, ac); > XtManageChild(menu_bar); > > /* attach the menu bar to the form */ > ac = 0; > XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++; > XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; > XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; > XtSetValues(menu_bar, al, ac); > > create_menus(menu_bar); > > /* create a button */ > ac = 0; > click = XmCreatePushButton(form, "Click", al, ac); > XtManageChild(click); > > /* attach the button to the form */ > ac = 0; > XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; > XtSetArg(al[ac], XmNtopWidget, menu_bar); ac++; > XtSetValues(click, al, ac); > > XtRealizeWidget(toplevel); > XtAppMainLoop(context); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 462678
: 317049