Posted to tcl by patthoyts at Sat Dec 05 17:32:16 GMT 2009view raw
- Attempt to sort out the flashing of Tk menu items on Ubuntu.
- Doesnt actually work.
- Index: unix/tkUnixWm.c
- ===================================================================
- RCS file: /cvsroot/tktoolkit/tk/unix/tkUnixWm.c,v
- retrieving revision 1.73
- diff -u -p -r1.73 tkUnixWm.c
- --- unix/tkUnixWm.c 1 Aug 2009 08:05:11 -0000 1.73
- +++ unix/tkUnixWm.c 9 Nov 2009 22:17:00 -0000
- @@ -639,6 +639,14 @@ TkWmNewWindow(
- */
- void
- +TkSetTransientFor(Tk_Window tkwin, Tk_Window parent)
- +{
- + XSetTransientForHint(Tk_Display(tkwin),
- + ((TkWindow *)tkwin)->wmInfoPtr->wrapperPtr->window,
- + ((TkWindow *)parent)->wmInfoPtr->wrapperPtr->window);
- +}
- +
- +void
- TkWmMapWindow(
- TkWindow *winPtr) /* Top-level window that's about to be
- * mapped. */
- @@ -668,6 +676,22 @@ TkWmMapWindow(
- UpdateTitle(winPtr);
- UpdatePhotoIcon(winPtr);
- + /*
- + * Update any class specific hints
- + */
- + {
- + Atom atoms[1];
- + Atom _NET_WM_WINDOW_TYPE = Tk_InternAtom((Tk_Window)wmPtr->winPtr,
- + "_NET_WM_WINDOW_TYPE_MENU");
- + atoms[0] = Tk_InternAtom((Tk_Window)wmPtr->winPtr,
- + "_NET_WM_WINDOW_TYPE_UTILITY");
- + XChangeProperty(wmPtr->winPtr->display, wmPtr->wrapperPtr->window,
- + _NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace,
- + (unsigned char *) &atoms, 1);
- + fprintf(stderr, "set utility window\n");
- + }
- +
- +
- if (wmPtr->masterPtr != NULL) {
- /*
- * Don't map a transient if the master is not mapped.