Discussion:
[bug #25643] WindowMaker no longer picking up icon...
Gregory John Casamento
2009-02-19 15:30:56 UTC
Permalink
URL:
<http://savannah.gnu.org/bugs/?25643>

Summary: WindowMaker no longer picking up icon...
Project: GNUstep
Submitted by: gcasa
Submitted on: Thu 19 Feb 2009 10:30:54 AM EST
Category: Gui/AppKit
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: gcasa
Open/Closed: Open
Discussion Lock: Any

_______________________________________________________

Details:

Steps to recreate:

1) Start an app that is not on the dock.
2) Drag it's miniwindow to the dock
3) stop the app

ACTUAL: The application's icon will not be on the dock.
EXPECTED: The application icon should be on the dock.

NOTE: This is likely due to recent changes made by myself and Richard. I
made a change to make certain that the icon size would be adjusted to the
proper size for the icon setting in WindowMaker and Richard made a change to
avoid some X-windows errors since the code may have been trying to access the
size of the miniwindow prior to the miniwindow appearing.

I will begin looking into this ASAP.






_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?25643>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
matt rice
2009-02-19 16:22:18 UTC
Permalink
Follow-up Comment #1, bug #25643 (project gnustep):

still running a fairly old gui,
but I'm guessing it was r27778

http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSApplication.m?r2=27778&rev=27778&r1=27775&dir_pagestart=50

where this moves the call:
[self setApplicationIconImage: image];

after the call to _appIconInit;

in back/Source/x11/XGServerWindow.m -orderWindow:::
_createAppIconPixmaps (where windowmaker gets the icon) is only called once
at the ordering in of the icon window

and _appIconInit calls -orderFrontRegardless.

iirc windowmaker might do the same looking for the app-icon once when it
mapping, and then caching it, which is probably why i didn't add some
[GSCurrentServer() _setAppIconImage:] but it might be worth trying

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?25643>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Riccardo mottola
2009-02-20 22:20:26 UTC
Permalink
Follow-up Comment #2, bug #25643 (project gnustep):

I tried here with a couple of applications. They all "dock" in the dock with
the three dots, some will retain the icon, some get a generic icon... it is
not "size" related either, since for example PRICE retains its big 64x64 icon,
battery monitor will not. SystemPreferences works...

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?25643>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
matt rice
2009-02-21 01:11:19 UTC
Permalink
Follow-up Comment #3, bug #25643 (project gnustep):

Riccardo, it is possible that some apps icons were cached by windowmaker
before the bug appeared, I believe in
~/GNUstep/Library/WindowMaker/CachedPixmaps before this bug appeared which
could be why some apps get this behaviour and others do not, to reliably
reproduce this you may need to remove the cached icon...


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?25643>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Fred Kiefer
2009-02-21 22:39:58 UTC
Permalink
Follow-up Comment #4, bug #25643 (project gnustep):

I think the change that Matt pointed to is really the cause of the problem.

Looks like Richard made that change in responce to some change by Greg. And I
have problems understanding that first change.
To me it looks like we are restricting the size of the icon window twice.
Once when setting it as the application icon and another time when we set a
copy as the image of the icon view. Are they both needed?
Also the scaling computation here is unclear to me. I think it is best to
remove all unneeded code here first and then sort out the order of things.

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?25643>

_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/
matt rice
2009-02-21 23:28:22 UTC
Permalink
Follow-up Comment #5, bug #25643 (project gnustep):

yuo don't understand the scaling in scaledIconSizeForSize(imageSize)?

basically it tries to keep the same aspect ratio

assuming the icon is made for a 64x64 icon window
and the icon is some random size like 48x56

so say windowmaker returns a 32x32 iconSize

we scale the icon down by

48 * 32 / 64 = 24;
56 * 32 / 64 = 28;

so our new icon is 24x28

we do this on a copy because other places (exception panels, file open
dialogs etc, use the -applicationIconImage:
and i felt it was best to have -applicationIconImage: return what was set in
-setApplicationIconImage: and keep a private scaled copy for the actual
icon...

I would say make scaledIconSizeForSize() could just not scale up, only scale
down, and then maybe -setImage: could return the scaled copy or provide an
accessor method in NSAppIconView for the mini window stuff below it?

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?25643>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Gregory John Casamento
2009-03-02 01:07:56 UTC
Permalink
Update of bug #25643 (project gnustep):

Status: None => Fixed
Open/Closed: Open => In Test

_______________________________________________________

Follow-up Comment #6:

I've removed the need for the setApplicationIconImage: method to reference
the window, so I've put it before the call to _appIconInit which calls the
_createAppIconPixmaps method. This solves the issue.

Please take a look and let me know if there's any issue with my change. it
does appear to work for me.

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?25643>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
matt rice
2009-03-02 05:19:33 UTC
Permalink
Follow-up Comment #7, bug #25643 (project gnustep):

hmm, i can't really test, as I don't have a windowmaker handy,
but i still don't like how

[[NSApp setApplicationIconImage:fooImage] iconImage];

can return a scaled fooImage

attached is what i had in mind...

(file #17558)
_______________________________________________________

Additional Item Attachment:

File name: foo.diff Size:2 KB


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?25643>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Gregory John Casamento
2018-01-31 23:34:47 UTC
Permalink
Follow-up Comment #8, bug #25643 (project gnustep):

This is now occurring again with the latest version of WindowMaker and
GNUstep. I am getting the "default" icon instead of the icon GNUstep sets.
GC

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?25643>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Gregory John Casamento
2018-01-31 23:41:36 UTC
Permalink
Update of bug #25643 (project gnustep):

Status: Fixed => None
Assigned to: gcasa => None
Open/Closed: In Test => Open


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?25643>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/

Loading...