#92 -D option doesn't work on 64bit system

closed-accepted
None
5
2005-12-27
2005-11-22
Hayase
No

-D option doesn't work on 64bit system.

In xwin.c, PropMotifWmHints is declared and passed to
XChangeProperty
as follows.

==============================================================================
typedef struct
{
uint32 flags;
uint32 functions;
uint32 decorations;
sint32 inputMode;
uint32 status;
}
PropMotifWmHints;
...
PropMotifWmHints motif_hints;
...
XChangeProperty(g_display, g_wnd, hintsatom,
hintsatom, 32, PropModeReplace,
(unsigned char *) &motif_hints,
PROP_MOTIF_WM_HINTS_ELEMENTS);
==============================================================================

And in the manpage of XChangeProperty

==============================================================================
int XChangeProperty(Display *display, Window w,
Atom property, Atom
type, int format, int mode, unsigned char
*data, int nelements);
...
If the specified format is 32, the property data
must be a long array.
==============================================================================

Therefore, the members of PropModeReplace should be
declared as a
``long'', not as a 32bit integer.

Discussion

  • Ilya Konstantinov

    Logged In: YES
    user_id=335423

    Good catch.
    I'll be moving this to 'Patches'.

     
  • Ilya Konstantinov

    Logged In: YES
    user_id=335423

    Peter, can you check this in?

     
  • Ilya Konstantinov

    • assigned_to: nobody --> astrand
     
  • Peter Åstrand

    Peter Åstrand - 2005-12-27

    Logged In: YES
    user_id=344921

    Applied.

     
  • Peter Åstrand

    Peter Åstrand - 2005-12-27
    • status: open --> closed-accepted
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks