comparison os2/dw.c @ 1716:b39c137cc6f5

Only use the ID on OS/2 in dw_window_set_bitmap_from_file() if the data is NULL.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 08 May 2012 17:34:36 +0000
parents e2c5715d057d
children 4314ee3dbeb1
comparison
equal deleted inserted replaced
1715:e6b139e0b64d 1716:b39c137cc6f5
7053 int depth; 7053 int depth;
7054 7054
7055 /* Destroy any old bitmap data */ 7055 /* Destroy any old bitmap data */
7056 _free_bitmap(handle); 7056 _free_bitmap(handle);
7057 7057
7058 /* If id is non-zero use the resource */ 7058 if ( data )
7059 if ( id )
7060 {
7061 hps = WinGetPS( handle );
7062 hbm = GpiLoadBitmap( hps, NULLHANDLE, id, 0, 0 );
7063 }
7064 else if ( data )
7065 { 7059 {
7066 file = tmpnam( NULL ); 7060 file = tmpnam( NULL );
7067 if ( file != NULL ) 7061 if ( file != NULL )
7068 { 7062 {
7069 fp = fopen( file, "wb" ); 7063 fp = fopen( file, "wb" );
7088 7082
7089 dw_window_set_data(handle, "_dw_hps", (void *)hps); 7083 dw_window_set_data(handle, "_dw_hps", (void *)hps);
7090 dw_window_set_data(handle, "_dw_hdc", (void *)hdc); 7084 dw_window_set_data(handle, "_dw_hdc", (void *)hdc);
7091 dw_window_set_data(handle, "_dw_width", (void *)width); 7085 dw_window_set_data(handle, "_dw_width", (void *)width);
7092 dw_window_set_data(handle, "_dw_height", (void *)height); 7086 dw_window_set_data(handle, "_dw_height", (void *)height);
7087 }
7088 /* If id is non-zero use the resource */
7089 else if ( id )
7090 {
7091 hps = WinGetPS( handle );
7092 hbm = GpiLoadBitmap( hps, NULLHANDLE, id, 0, 0 );
7093 } 7093 }
7094 else 7094 else
7095 return; 7095 return;
7096 7096
7097 WinSetWindowBits(handle,QWL_STYLE,SS_BITMAP,SS_BITMAP | 0x7f); 7097 WinSetWindowBits(handle,QWL_STYLE,SS_BITMAP,SS_BITMAP | 0x7f);