Alex Henrie alexhenrie24@gmail.com writes:
@@ -611,7 +612,7 @@ static void fetch_icon_data( HWND hwnd, HICON icon_big, HICON icon_small ) if (!icon_small) icon_small = (HICON)GetClassLongPtrW( hwnd, GCLP_HICONSM ); }
- if (!GetIconInfo(icon_big, &ii)) return;
- if (!GetIconInfo(icon_small, &ii) && !GetIconInfo(icon_big, &ii)) return;
This doesn't make sense. What are you trying to do?
2016-03-24 6:53 GMT-06:00 Alexandre Julliard julliard@winehq.org:
Alex Henrie alexhenrie24@gmail.com writes:
@@ -611,7 +612,7 @@ static void fetch_icon_data( HWND hwnd, HICON icon_big, HICON icon_small ) if (!icon_small) icon_small = (HICON)GetClassLongPtrW( hwnd, GCLP_HICONSM ); }
- if (!GetIconInfo(icon_big, &ii)) return;
- if (!GetIconInfo(icon_small, &ii) && !GetIconInfo(icon_big, &ii)) return;
This doesn't make sense. What are you trying to do?
I'm trying to make the function not fail if there is no big icon, and at the same time prefer the small icon over the big icon. What's the right way?
-Alex
Alex Henrie alexhenrie24@gmail.com writes:
2016-03-24 6:53 GMT-06:00 Alexandre Julliard julliard@winehq.org:
Alex Henrie alexhenrie24@gmail.com writes:
@@ -611,7 +612,7 @@ static void fetch_icon_data( HWND hwnd, HICON icon_big, HICON icon_small ) if (!icon_small) icon_small = (HICON)GetClassLongPtrW( hwnd, GCLP_HICONSM ); }
- if (!GetIconInfo(icon_big, &ii)) return;
- if (!GetIconInfo(icon_small, &ii) && !GetIconInfo(icon_big, &ii)) return;
This doesn't make sense. What are you trying to do?
I'm trying to make the function not fail if there is no big icon, and at the same time prefer the small icon over the big icon. What's the right way?
I don't think you want to prefer the small one. If there's no big one at all, maybe, but otherwise it's not going to give good results.
2016-03-24 10:02 GMT-06:00 Alexandre Julliard julliard@winehq.org:
Alex Henrie alexhenrie24@gmail.com writes:
2016-03-24 6:53 GMT-06:00 Alexandre Julliard julliard@winehq.org:
Alex Henrie alexhenrie24@gmail.com writes:
@@ -611,7 +612,7 @@ static void fetch_icon_data( HWND hwnd, HICON icon_big, HICON icon_small ) if (!icon_small) icon_small = (HICON)GetClassLongPtrW( hwnd, GCLP_HICONSM ); }
- if (!GetIconInfo(icon_big, &ii)) return;
- if (!GetIconInfo(icon_small, &ii) && !GetIconInfo(icon_big, &ii)) return;
This doesn't make sense. What are you trying to do?
I'm trying to make the function not fail if there is no big icon, and at the same time prefer the small icon over the big icon. What's the right way?
I don't think you want to prefer the small one. If there's no big one at all, maybe, but otherwise it's not going to give good results.
If I don't change this line, my test program fails: Wine displays the big icon in the title bar when Windows displays the small icon there.
I'm sure that there's a way to improve this function, I'm just not sure how.
-Alex
Alex Henrie alexhenrie24@gmail.com writes:
2016-03-24 10:02 GMT-06:00 Alexandre Julliard julliard@winehq.org:
I don't think you want to prefer the small one. If there's no big one at all, maybe, but otherwise it's not going to give good results.
If I don't change this line, my test program fails: Wine displays the big icon in the title bar when Windows displays the small icon there.
That's the window manager doing it, right? I don't think we should stop providing good icon data in order to trick the window manager into displaying the small icon. We should provide all the information we have, and let the window manager display it as it sees fit.
2016-03-24 20:52 GMT-06:00 Alexandre Julliard julliard@winehq.org:
Alex Henrie alexhenrie24@gmail.com writes:
2016-03-24 10:02 GMT-06:00 Alexandre Julliard julliard@winehq.org:
I don't think you want to prefer the small one. If there's no big one at all, maybe, but otherwise it's not going to give good results.
If I don't change this line, my test program fails: Wine displays the big icon in the title bar when Windows displays the small icon there.
That's the window manager doing it, right? I don't think we should stop providing good icon data in order to trick the window manager into displaying the small icon. We should provide all the information we have, and let the window manager display it as it sees fit.
Okay, that makes sense. Wine provides both a big icon and a small icon to the window manager, so either this is a bug in xfwm4 or it's xfwm4's intended behavior.
I think I'll close the bug report as WONTFIX. Eventually, Wine will have a Wayland driver and there we'll always be drawing the window decorations ourselves anyway.
-Alex