bugGNUstep - Bugs: bug #25643, WindowMaker no longer picking up...

Group
 
 

bug #25643: WindowMaker no longer picking up icon...

Submitter:  Gregory John Casamento <gcasa>
Submitted:  Thu 19 Feb 2009 03:30:54 PM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Works For Me
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 31 Jan 2018 11:34:46 PM UTC, comment #8: 

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

Gregory John Casamento <gcasa>
Group administrator
Mon 02 Mar 2009 05:19:32 AM UTC, comment #7: 

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)

matt rice <ratmice>
Group Member
Mon 02 Mar 2009 01:07:54 AM UTC, 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.

Gregory John Casamento <gcasa>
Group administrator
Sat 21 Feb 2009 11:28:22 PM UTC, comment #5: 

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?

matt rice <ratmice>
Group Member
Sat 21 Feb 2009 10:39:57 PM UTC, comment #4: 

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.

Fred Kiefer <FredKiefer>
Group Member
Sat 21 Feb 2009 01:11:18 AM UTC, comment #3: 

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...

matt rice <ratmice>
Group Member
Fri 20 Feb 2009 10:20:25 PM UTC, comment #2: 

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...

Riccardo Mottola <rmottola>
Group Member
Thu 19 Feb 2009 04:22:17 PM UTC, comment #1: 

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

matt rice <ratmice>
Group Member
Thu 19 Feb 2009 03:30:54 PM UTC, original submission:  

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.


Gregory John Casamento <gcasa>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #17558:  foo.diff added by ratmice (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by rmottola (Posted a comment)
  • -email is unavailable- added by ratmice (Posted a comment)
  • -email is unavailable- added by gcasa (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-10-30 gcasa StatusNone Works For Me
        Open/ClosedOpen Closed
    2018-01-31 gcasa StatusFixed None
        Assigned togcasa None
        Open/ClosedIn Test Open
    2009-03-02 ratmice Attached File- Added foo.diff, #17558
    2009-03-02 gcasa StatusNone Fixed
        Open/ClosedOpen In Test

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code