diff options
author | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:58:55 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:58:55 +0200 |
commit | 1a74e03235ced7003989b8c02bc4d955234431c1 (patch) | |
tree | b2fe2db7f3e1a9aac1ed669f2cf7b4e7d8e8e917 /nx-X11/programs/Xserver/hw/nxagent/Rootless.c | |
parent | 97fe7650e309c529085abef6e6418796b36f421c (diff) | |
download | nx-libs-1a74e03235ced7003989b8c02bc4d955234431c1.tar.gz nx-libs-1a74e03235ced7003989b8c02bc4d955234431c1.tar.bz2 nx-libs-1a74e03235ced7003989b8c02bc4d955234431c1.zip |
Imported nxagent-3.3.0-10.tar.gznxagent/3.3.0-10
Summary: Imported nxagent-3.3.0-10.tar.gz
Keywords:
Imported nxagent-3.3.0-10.tar.gz
into Git repository
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Rootless.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Rootless.c | 63 |
1 files changed, 42 insertions, 21 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c index cd69af665..79cb74efa 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c @@ -46,6 +46,20 @@ * initialized. */ +typedef struct +{ + CARD32 flags; + CARD32 input; + CARD32 initial_state; + CARD32 icon_pixmap; + CARD32 icon_window; + INT32 icon_x; + INT32 icon_y; + CARD32 icon_mask; + CARD32 window_group; +} +nxagentWMHints; + WindowPtr nxagentRootlessWindow = NULL; #define TOP_LEVEL_TABLE_UNIT 100 @@ -414,7 +428,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) char *propertyS, *typeS; Atom propertyX, typeX; char *output = NULL; - XWMHints wmHints; + nxagentWMHints wmHints; Bool export = False; Bool freeMem = False; @@ -470,7 +484,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) else if (strcmp(typeS, "WM_HINTS") == 0) { ClientPtr pClient = wClient(pWin); - wmHints = *(XWMHints*)value; + wmHints = *(nxagentWMHints*)value; wmHints.flags |= InputHint; wmHints.input = True; @@ -497,9 +511,10 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) wmHints.flags &= ~IconPixmapHint; #ifdef WARNING - fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon pixmap %lx from hint " + fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon pixmap %x from hint " "exporting property %s type %s on window %p.\n", - wmHints.icon_pixmap, propertyS, typeS, (void*)pWin); + (unsigned int) wmHints.icon_pixmap, propertyS, typeS, + (void*)pWin); #endif } } @@ -518,9 +533,10 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) wmHints.flags &= ~IconWindowHint; #ifdef WARNING - fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon window %lx from hint " + fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon window %x from hint " "exporting property %s type %s on window %p.\n", - wmHints.icon_window, propertyS, typeS, (void*)pWin); + (unsigned int) wmHints.icon_window, propertyS, typeS, + (void*)pWin); #endif } } @@ -539,9 +555,10 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) wmHints.flags &= ~IconMaskHint; #ifdef WARNING - fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon mask %lx from hint " + fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon mask %x from hint " "exporting property %s type %s on window %p.\n", - wmHints.icon_mask, propertyS, typeS, (void*)pWin); + (unsigned int) wmHints.icon_mask, propertyS, typeS, + (void*)pWin); #endif } } @@ -560,9 +577,10 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) wmHints.flags &= ~WindowGroupHint; #ifdef WARNING - fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up window group %lx from hint " + fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up window group %x from hint " "exporting property %s type %s on window %p.\n", - wmHints.window_group, propertyS, typeS, (void*)pWin); + (unsigned int) wmHints.window_group, propertyS, typeS, + (void*)pWin); #endif } } @@ -654,7 +672,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) { #ifdef TEST fprintf(stderr, "nxagentExportProperty: WARNING! Ignored ChangeProperty " - "on %swindow %lx property %s type %s nUnits %ld format %d\n", + "on %swindow %x property %s type %s nUnits %ld format %d\n", nxagentWindowTopLevel(pWin) ? "toplevel " : "", nxagentWindow(pWin), validateString(propertyS), validateString(typeS), nUnits, format); @@ -683,7 +701,7 @@ void nxagentImportProperty(Window window, WindowPtr pWin; Bool import = False; Bool freeMem = False; - XWMHints wmHints; + nxagentWMHints wmHints; typedef struct { CARD32 state; @@ -797,7 +815,7 @@ void nxagentImportProperty(Window window, } else if (strcmp(typeS, "WM_HINTS") == 0) { - wmHints = *(XWMHints*)buffer; + wmHints = *(nxagentWMHints*)buffer; output = (char*) &wmHints; import = True; @@ -815,8 +833,9 @@ void nxagentImportProperty(Window window, #ifdef WARNING fprintf(stderr, "nxagentImportProperty: WARNING! Failed to look up remote icon " - "pixmap %ld from hint importing property [%ld] type %s on window %p.\n", - wmHints.icon_pixmap, (long int) property, typeS, (void *) pWin); + "pixmap %d from hint importing property [%ld] type %s on window %p.\n", + (unsigned int) wmHints.icon_pixmap, (long int) property, + typeS, (void *) pWin); #endif } } @@ -835,8 +854,9 @@ void nxagentImportProperty(Window window, #ifdef WARNING fprintf(stderr, "nxagenImportProperty: WARNING! Failed to look up remote icon " - "window %lx from hint importing property [%ld] type %s on window %p.\n", - wmHints.icon_window, (long int) property, typeS, (void *) pWin); + "window %x from hint importing property [%ld] type %s on window %p.\n", + (unsigned int) wmHints.icon_window, + (long int) property, typeS, (void *) pWin); #endif } } @@ -855,8 +875,8 @@ void nxagentImportProperty(Window window, #ifdef WARNING fprintf(stderr, "nxagentImportProperty: WARNING! Failed to look up remote icon " - "mask %lx from hint importing property [%ld] type %s on window %p.\n", - wmHints.icon_mask, (long int) property, typeS, (void *) pWin); + "mask %x from hint importing property [%ld] type %s on window %p.\n", + (unsigned int) wmHints.icon_mask, (long int) property, typeS, (void *) pWin); #endif } } @@ -875,8 +895,9 @@ void nxagentImportProperty(Window window, #ifdef WARNING fprintf(stderr, "nxagentImportProperty: WARNING! Failed to look up remote window " - "group %lx from hint importing property [%ld] type %s on window %p.\n", - wmHints.window_group, (long int) property, typeS, (void *) pWin); + "group %x from hint importing property [%ld] type %s on window %p.\n", + (unsigned int) wmHints.window_group, + (long int) property, typeS, (void *) pWin); #endif } } |