Skip to content

Commit

Permalink
Use new C2P routine + corrections for iconification window
Browse files Browse the repository at this point in the history
  • Loading branch information
pmandin committed Nov 12, 2003
1 parent e7c35da commit d5c17ce
Show file tree
Hide file tree
Showing 5 changed files with 552 additions and 324 deletions.
9 changes: 9 additions & 0 deletions src/video/gem/SDL_gemevents.c
Expand Up @@ -219,6 +219,11 @@ static int do_messages(_THIS, short *message)
/* Send an internal deactivate event */
SDL_PrivateAppActive(0, SDL_APPACTIVE|SDL_APPINPUTFOCUS);
}
/* Update window title */
if (GEM_refresh_name && GEM_icon_name) {
wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_icon_name)>>16),(short)(((unsigned long)GEM_icon_name) & 0xffff),0,0);
GEM_refresh_name = SDL_FALSE;
}
break;
case WM_UNICONIFY:
wind_set(message[3],WF_UNICONIFY,message[4],message[5],message[6],message[7]);
Expand All @@ -227,6 +232,10 @@ static int do_messages(_THIS, short *message)
/* Send an internal activate event */
SDL_PrivateAppActive(1, SDL_APPACTIVE);
}
if (GEM_refresh_name && GEM_title_name) {
wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_title_name)>>16),(short)(((unsigned long)GEM_title_name) & 0xffff),0,0);
GEM_refresh_name = SDL_FALSE;
}
break;
case WM_SIZED:
wind_set (message[3], WF_CURRXYWH, message[4], message[5], message[6], message[7]);
Expand Down
24 changes: 18 additions & 6 deletions src/video/gem/SDL_gemmouse.c
Expand Up @@ -43,6 +43,8 @@ static char rcsid =

/* Defines */

/*#define DEBUG_VIDEO_GEM 1*/

#define MAXCURWIDTH 16
#define MAXCURHEIGHT 16

Expand Down Expand Up @@ -102,36 +104,46 @@ WMcursor *GEM_CreateWMCursor(_THIS,
new_mform->mf_fg = 0;
new_mform->mf_bg = 1;

for (i=0;i<MAXCURHEIGHT;i++)
{
for (i=0;i<MAXCURHEIGHT;i++) {
new_mform->mf_mask[i]=0;
new_mform->mf_data[i]=0;
}

if (w<=8) {
for (i=0;i<h;i++)
{
for (i=0;i<h;i++) {
new_mform->mf_mask[i]= mask[i]<<8;
new_mform->mf_data[i]= data[i]<<8;
}
} else {
for (i=0;i<h;i++)
{
for (i=0;i<h;i++) {
new_mform->mf_mask[i]= mask[i<<1]<<8 | mask[(i<<1)+1];
new_mform->mf_data[i]= data[i<<1]<<8 | data[(i<<1)+1];
}
}

#ifdef DEBUG_VIDEO_GEM
for (i=0; i<h ;i++) {
printf("sdl:video:gem: cursor, line %d = 0x%04x\n", i, new_mform->mf_mask[i]);
}

printf("sdl:video:gem: CreateWMCursor(): done\n");
#endif

return cursor;
}

int GEM_ShowWMCursor(_THIS, WMcursor *cursor)
{
/*
if (cursor == NULL) {
graf_mouse(M_OFF, NULL);
} else if (cursor->mform_p) {
graf_mouse(USER_DEF, cursor->mform_p);
}
*/
#ifdef DEBUG_VIDEO_GEM
printf("sdl:video:gem: ShowWMCursor(0x%08x)\n", (long) cursor);
#endif

return 1;
}
Expand Down

0 comments on commit d5c17ce

Please sign in to comment.