Bugzilla – Attachment 49650 Details for
Bug 114490
gtk2 not using correct cursors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
xorg-x11-114490-xcursor-reset-theme-name.diff
xorg-x11-114490-xcursor-reset-theme-name.diff (text/plain), 2.29 KB, created by
Federico Mena Quintero
on 2005-09-12 16:02:43 UTC
(
hide
)
Description:
xorg-x11-114490-xcursor-reset-theme-name.diff
Filename:
MIME Type:
Creator:
Federico Mena Quintero
Created:
2005-09-12 16:02:43 UTC
Size:
2.29 KB
patch
obsolete
>See https://bugs.freedesktop.org/show_bug.cgi?id=4244 for the original bug > > >diff -urp lib/Xcursor.orig/display.c lib/Xcursor/display.c >--- lib/Xcursor.orig/display.c 2005-01-03 17:24:43.000000000 -0600 >+++ lib/Xcursor/display.c 2005-09-12 09:38:50.000000000 -0500 >@@ -27,6 +27,18 @@ > > static XcursorDisplayInfo *_XcursorDisplayInfo; > >+static void >+_XcursorFreeDisplayInfo (XcursorDisplayInfo *info) >+{ >+ if (info->theme) >+ free (info->theme); >+ >+ if (info->theme_from_config) >+ free (info->theme_from_config); >+ >+ free (info); >+} >+ > static int > _XcursorCloseDisplay (Display *dpy, XExtCodes *codes) > { >@@ -43,10 +55,8 @@ _XcursorCloseDisplay (Display *dpy, XExt > break; > } > _XUnlockMutex (_Xglobal_lock); >- >- if (info->theme) >- free (info->theme); >- free (info); >+ >+ _XcursorFreeDisplayInfo (info); > return 0; > } > >@@ -189,6 +199,7 @@ _XcursorGetDisplayInfo (Display *dpy) > } > > info->theme = 0; >+ info->theme_from_config = 0; > > /* > * Get the desired theme >@@ -198,9 +209,17 @@ _XcursorGetDisplayInfo (Display *dpy) > v = XGetDefault (dpy, "Xcursor", "theme"); > if (v) > { >- info->theme = malloc (strlen (v) + 1); >+ int len; >+ >+ len = strlen (v) + 1; >+ >+ info->theme = malloc (len); > if (info->theme) > strcpy (info->theme, v); >+ >+ info->theme_from_config = malloc (len); >+ if (info->theme_from_config) >+ strcpy (info->theme_from_config, v); > } > > /* >@@ -252,9 +271,7 @@ _XcursorGetDisplayInfo (Display *dpy) > break; > if (old) > { >- if (info->theme) >- free (info->theme); >- free (info); >+ _XcursorFreeDisplayInfo (info); > info = old; > } > else >@@ -312,6 +329,10 @@ XcursorSetTheme (Display *dpy, const cha > > if (!info) > return XcursorFalse; >+ >+ if (!theme) >+ theme = info->theme_from_config; >+ > if (theme) > { > copy = malloc (strlen (theme) + 1); >diff -urp lib/Xcursor.orig/xcursorint.h lib/Xcursor/xcursorint.h >--- lib/Xcursor.orig/xcursorint.h 2005-01-03 17:24:43.000000000 -0600 >+++ lib/Xcursor/xcursorint.h 2005-09-12 09:29:06.000000000 -0500 >@@ -85,6 +85,7 @@ typedef struct _XcursorDisplayInfo { > int size; > XcursorFontInfo *fonts; > char *theme; >+ char *theme_from_config; > XcursorDither dither; > XcursorBitmapInfo bitmaps[NUM_BITMAPS]; > } XcursorDisplayInfo;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 114490
:
49406
|
49604
|
49612
| 49650 |
49901
|
49922