We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1022

Summary: X11_SetWindowIcon doesn't set new icons on amd64
Product: SDL Reporter: Kervala <kervala>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: karl.glatzer
Version: HG 2.0   
Hardware: x86_64   
OS: Linux   
Attachments: Patch for 64 bit X11 window icons
Console log of Segfault
gdb backtrace

Description Kervala 2010-07-13 10:32:17 UTC
On 64bits machines, X11_SetWindowIcon doesn't work as intended.

After more investigation, I noticed that surface data used for an icon should not be an array of Uint32 (as now) but an array of "long" and "long" seems to be 64 bits on 64 bits platforms.

I tried some games which uses SDL and both of them doesn't have any icon under GNU/Linux 64 bits.
Comment 1 Karl F. Glatzer 2010-07-15 01:19:02 UTC
I can verify this, icons work without problem on i386 but on amd64 the icons won't show up.

I replaced the Uint32 with long and the icon shows up on amd64 too. It has the wrong size and seems doubled or quadrupled thought.
Comment 2 Karl F. Glatzer 2010-07-15 02:34:54 UTC
Created attachment 516 [details]
Patch for 64 bit X11 window icons

Made a patch which fixes the bug ;)
Comment 3 Sam Lantinga 2010-07-17 18:45:10 UTC
Fixed with changeset f06faa886423

Thanks!
Comment 4 Karl F. Glatzer 2010-07-18 06:40:11 UTC
Created attachment 522 [details]
Console log of Segfault
Comment 5 Karl F. Glatzer 2010-07-18 06:41:05 UTC
Sry that i have to reopen this bug, but i got a segfault. I attached the console log.
Comment 6 Sam Lantinga 2010-07-21 00:16:19 UTC
Can you run it in the debugger and attach the backtrace?

Thanks!
Comment 7 Karl F. Glatzer 2010-07-21 05:37:33 UTC
Created attachment 526 [details]
gdb backtrace

Hope there is anything helpful in the backtrace.
Comment 8 Sam Lantinga 2010-07-21 21:57:01 UTC
Whoops, good catch.  This is fixed in revision 4566:40c833d951a1, thanks!