aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2005-09-11 20:34:04 +0000
committerJason Rumney2005-09-11 20:34:04 +0000
commit945a75f8b050d91308a7ee4d7e24d2cb5dce0f28 (patch)
tree6e42657152a540da4e5cbb35cc21f150b8c65893 /src
parent7525e76fc5f821eaccaaa7db0af3e5a036424951 (diff)
downloademacs-945a75f8b050d91308a7ee4d7e24d2cb5dce0f28.tar.gz
emacs-945a75f8b050d91308a7ee4d7e24d2cb5dce0f28.zip
2005-09-11 Chris Prince <cprince@gmail.com> (tiny change)
* w32term.c (x_bitmap_icon): Load small icons too.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/w32term.c28
2 files changed, 25 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e3fb1e07ab8..13f8c409cde 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12005-09-11 Chris Prince <cprince@gmail.com> (tiny change)
2
3 * w32term.c (x_bitmap_icon): Load small icons too.
4
12005-09-10 Romain Francoise <romain@orebokech.com> 52005-09-10 Romain Francoise <romain@orebokech.com>
2 6
3 * buffer.c (init_buffer): Grow buffer to add directory separator 7 * buffer.c (init_buffer): Grow buffer to add directory separator
diff --git a/src/w32term.c b/src/w32term.c
index 8f52b5178d0..8a28ac136b8 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -5267,16 +5267,25 @@ x_bitmap_icon (f, icon)
5267 struct frame *f; 5267 struct frame *f;
5268 Lisp_Object icon; 5268 Lisp_Object icon;
5269{ 5269{
5270 HANDLE hicon; 5270 HANDLE main_icon;
5271 HANDLE small_icon = NULL;
5271 5272
5272 if (FRAME_W32_WINDOW (f) == 0) 5273 if (FRAME_W32_WINDOW (f) == 0)
5273 return 1; 5274 return 1;
5274 5275
5275 if (NILP (icon)) 5276 if (NILP (icon))
5276 hicon = LoadIcon (hinst, EMACS_CLASS); 5277 main_icon = LoadIcon (hinst, EMACS_CLASS);
5277 else if (STRINGP (icon)) 5278 else if (STRINGP (icon))
5278 hicon = LoadImage (NULL, (LPCTSTR) SDATA (icon), IMAGE_ICON, 0, 0, 5279 {
5279 LR_DEFAULTSIZE | LR_LOADFROMFILE); 5280 /* Load the main icon from the named file. */
5281 main_icon = LoadImage (NULL, (LPCTSTR) SDATA (icon), IMAGE_ICON, 0, 0,
5282 LR_DEFAULTSIZE | LR_LOADFROMFILE);
5283 /* Try to load a small icon to go with it. */
5284 small_icon = LoadImage (NULL, (LPCSTR) SDATA (icon), IMAGE_ICON,
5285 GetSystemMetrics (SM_CXSMICON),
5286 GetSystemMetrics (SM_CYSMICON),
5287 LR_LOADFROMFILE);
5288 }
5280 else if (SYMBOLP (icon)) 5289 else if (SYMBOLP (icon))
5281 { 5290 {
5282 LPCTSTR name; 5291 LPCTSTR name;
@@ -5296,16 +5305,21 @@ x_bitmap_icon (f, icon)
5296 else 5305 else
5297 return 1; 5306 return 1;
5298 5307
5299 hicon = LoadIcon (NULL, name); 5308 main_icon = LoadIcon (NULL, name);
5300 } 5309 }
5301 else 5310 else
5302 return 1; 5311 return 1;
5303 5312
5304 if (hicon == NULL) 5313 if (main_icon == NULL)
5305 return 1; 5314 return 1;
5306 5315
5307 PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_BIG, 5316 PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_BIG,
5308 (LPARAM) hicon); 5317 (LPARAM) main_icon);
5318
5319 /* If there is a small icon that goes with it, set that too. */
5320 if (small_icon)
5321 PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_SMALL,
5322 (LPARAM) small_icon);
5309 5323
5310 return 0; 5324 return 0;
5311} 5325}