311 |
} |
} |
312 |
} |
} |
313 |
|
|
|
/* todo the remaining translate function might need some big endian check ?? */ |
|
|
|
|
314 |
static void |
static void |
315 |
translate15to16(uint16 * data, uint8 * out, uint8 * end) |
translate15to16(uint16 * data, uint8 * out, uint8 * end) |
316 |
{ |
{ |
541 |
pixel |= *(data++); |
pixel |= *(data++); |
542 |
|
|
543 |
value = make_colour(split_colour24(pixel)); |
value = make_colour(split_colour24(pixel)); |
544 |
|
|
545 |
if (g_xserver_be) |
if (g_xserver_be) |
546 |
{ |
{ |
547 |
*(out++) = value >> 16; |
*(out++) = value >> 16; |
775 |
/* |
/* |
776 |
* Determine desktop size |
* Determine desktop size |
777 |
*/ |
*/ |
778 |
if (g_width < 0) |
if (g_fullscreen) |
779 |
|
{ |
780 |
|
g_width = WidthOfScreen(g_screen); |
781 |
|
g_height = HeightOfScreen(g_screen); |
782 |
|
} |
783 |
|
else if (g_width < 0) |
784 |
{ |
{ |
785 |
/* Percent of screen */ |
/* Percent of screen */ |
786 |
g_height = HeightOfScreen(g_screen) * (-g_width) / 100; |
g_height = HeightOfScreen(g_screen) * (-g_width) / 100; |
803 |
g_height = 600; |
g_height = 600; |
804 |
} |
} |
805 |
} |
} |
|
else if (g_fullscreen) |
|
|
{ |
|
|
g_width = WidthOfScreen(g_screen); |
|
|
g_height = HeightOfScreen(g_screen); |
|
|
} |
|
806 |
|
|
807 |
/* make sure width is a multiple of 4 */ |
/* make sure width is a multiple of 4 */ |
808 |
g_width = (g_width + 3) & ~3; |
g_width = (g_width + 3) & ~3; |
943 |
void |
void |
944 |
ui_destroy_window(void) |
ui_destroy_window(void) |
945 |
{ |
{ |
|
ui_destroy_cursor(g_null_cursor); |
|
|
|
|
946 |
if (g_IC != NULL) |
if (g_IC != NULL) |
947 |
XDestroyIC(g_IC); |
XDestroyIC(g_IC); |
948 |
|
|
986 |
key_translation tr; |
key_translation tr; |
987 |
char str[256]; |
char str[256]; |
988 |
Status status; |
Status status; |
|
unsigned int state; |
|
|
Window wdummy; |
|
|
int dummy; |
|
989 |
|
|
990 |
while (XPending(g_display) > 0) |
while (XPending(g_display) > 0) |
991 |
{ |
{ |
1158 |
if (xevent.xfocus.mode == NotifyGrab) |
if (xevent.xfocus.mode == NotifyGrab) |
1159 |
break; |
break; |
1160 |
g_focused = True; |
g_focused = True; |
1161 |
XQueryPointer(g_display, g_wnd, &wdummy, &wdummy, &dummy, &dummy, |
reset_modifier_keys(); |
|
&dummy, &dummy, &state); |
|
|
reset_modifier_keys(state); |
|
1162 |
if (g_grab_keyboard && g_mouse_in_wnd) |
if (g_grab_keyboard && g_mouse_in_wnd) |
1163 |
XGrabKeyboard(g_display, g_wnd, True, |
XGrabKeyboard(g_display, g_wnd, True, |
1164 |
GrabModeAsync, GrabModeAsync, CurrentTime); |
GrabModeAsync, GrabModeAsync, CurrentTime); |