Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 196963 Details for
Bug 276833
net-im/amsn-0.97.2.r1 patch from systray in fluxbox
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Resolve bug in systray from fluxbox.
tray.patch (text/plain), 3.96 KB, created by
Javier Vecino (Coghan)
on 2009-07-06 21:42:53 UTC
(
hide
)
Description:
Resolve bug in systray from fluxbox.
Filename:
MIME Type:
Creator:
Javier Vecino (Coghan)
Created:
2009-07-06 21:42:53 UTC
Size:
3.96 KB
patch
obsolete
>--- utils/linux/traydock/libtray.c >+++ utils/linux/traydock/libtray.c >@@ -81,6 +81,14 @@ > //static int tooltip=0; > Tcl_Interp * globalinterp; > >+static Window GetParentWindow(Window w) { >+ Window root, parent, *children; >+ unsigned int n; >+ XQueryTree(display, w, &root, &parent, &children, &n); >+ XFree(children); >+ return parent; >+} >+ > /* Set embed information */ > static void > xembed_set_info (Tk_Window window, unsigned long flags) >@@ -161,30 +169,24 @@ > DockIcon(ClientData clientData) > { > >- Window root, parent, *children; >- unsigned int n, ret, atom; >+ Window parent; >+ unsigned int ret, atom; > TrayIcon *icon= clientData; > char* wm_name; > >- Tk_MapWindow(icon->win); >+ Tk_MakeWindowExist(icon->win); > >- XQueryTree(display, Tk_WindowId(icon->win), &root, &parent, &children, &n); >- XFree(children); >- > Tk_SetWindowBackgroundPixmap(icon->win, ParentRelative); >- XSetWindowBackgroundPixmap(display, parent, ParentRelative); > > xembed_set_info(icon->win,XEMBED_MAPPED); > >- Tk_UnmapWindow(icon->win); >- >- if ( (atom = XInternAtom(display, "_NET_SYSTEM_TRAY_OPCODE", True )) == None ) { >+ if ( (atom = XInternAtom(display, "_NET_SYSTEM_TRAY_OPCODE", False )) == None ) { > wm_name = get_wm_name(); > if (wm_name != NULL && !strcmp(wm_name, "KWin")) { > atom = XInternAtom(display, "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False); >+ parent = GetParentWindow(Tk_WindowId(icon->win)); > ret = XChangeProperty(display, parent, atom, > XA_WINDOW, 32, PropModeReplace, (unsigned char *)&parent, 1); >- Tk_MapWindow(icon->win); > } > XFree(wm_name); > } else { >@@ -245,6 +246,8 @@ > if (heightImg > h) > heightImg = h; > >+ if( !Tk_IsMapped(icon->win) ) >+ Tk_MapWindow(icon->win); > Tk_RedrawImage(icon->pixmap, 0, 0, widthImg, heightImg, Tk_WindowId(icon->win), (w-widthImg)/2 , (h-heightImg)/2 ); > > } >@@ -351,6 +354,12 @@ > XSizeHints *hint; > char cmdBuffer[1024]; > >+ /* systemtray was not available in Init */ >+ if (systemtray==0) { >+ Tcl_AppendResult (interp, "cannot create a tray icon without a system tray", (char *) NULL); >+ return TCL_ERROR; >+ } >+ > /* Get memory for trayicon data and zero it*/ > icon = (TrayIcon *) malloc(sizeof(TrayIcon)); > memset((void *) icon, 0, (sizeof(TrayIcon))); >@@ -358,18 +367,11 @@ > > mainw=Tk_MainWindow(interp); > >- /* systemtray was not available in Init */ >- if (systemtray==0) { >- Tcl_AppendResult (interp, "cannot create a tray icon without a system tray", (char *) NULL); >- return TCL_ERROR; >- } >- > /* Get the first argument string (object name) and check it */ > arg=Tcl_GetStringFromObj(objv[1],(int *) &length); > //printf("Arg: %s\n",arg); >- if (strncmp(arg,".",1)) { >- Tcl_AppendResult (interp, "bad path name: ", >- Tcl_GetStringFromObj(objv[1],(int *) &length) , (char *) NULL); >+ if (length >= 1 && arg[0] != '.') { >+ Tcl_AppendResult (interp, "bad path name: ", arg , (char *) NULL); > return TCL_ERROR; > } > >@@ -414,7 +416,7 @@ > n++; > strcpy (icon->tooltip,Tcl_GetStringFromObj(objv[n],(int *) &length)); > } else if (!strncmp(arg,"-command",length)) { >- /* Copy tooltip string */ >+ /* Copy command string */ > n++; > strcpy (icon->cmdCallback,Tcl_GetStringFromObj(objv[n],(int *) &length)); > } else { >@@ -431,10 +433,12 @@ > if (pixmap != NULL) { > /* Create the window */ > icon->win=Tk_CreateWindowFromPath(interp,mainw, >- Tcl_GetStringFromObj(objv[1],(int *) &length),""); >+ Tcl_GetStringFromObj(objv[1],(int *) &length),NULL); > > DockIcon((ClientData)icon); > >+ Tk_GeometryRequest( icon->win, 24, 24); >+ > icon->pixmap=Tk_GetImage(interp,icon->win,pixmap,ImageChangedProc, (ClientData)icon); > > /* Create callback function for event handling */ >@@ -444,9 +448,11 @@ > > /* Set default icon size hint */ > hint = XAllocSizeHints(); >- hint->flags |=PMinSize; >- hint->min_width=24; >- hint->min_height=24; >+ hint->flags |=PMinSize|PMaxSize; >+ hint->min_width=16; >+ hint->max_width=64; >+ hint->min_height=16; >+ hint->max_height=64; > > XSetWMNormalHints(display,Tk_WindowId(icon->win),hint); > XFree(hint);
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 276833
: 196963