79 |
static BOOL g_moving_wnd; |
static BOOL g_moving_wnd; |
80 |
static int g_move_x_offset = 0; |
static int g_move_x_offset = 0; |
81 |
static int g_move_y_offset = 0; |
static int g_move_y_offset = 0; |
82 |
|
static BOOL g_using_full_workarea = False; |
83 |
|
|
84 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
85 |
extern int g_dsp_fd; |
extern int g_dsp_fd; |
92 |
#define PROP_MOTIF_WM_HINTS_ELEMENTS 5 |
#define PROP_MOTIF_WM_HINTS_ELEMENTS 5 |
93 |
typedef struct |
typedef struct |
94 |
{ |
{ |
95 |
uint32 flags; |
unsigned long flags; |
96 |
uint32 functions; |
unsigned long functions; |
97 |
uint32 decorations; |
unsigned long decorations; |
98 |
sint32 inputMode; |
long inputMode; |
99 |
uint32 status; |
unsigned long status; |
100 |
} |
} |
101 |
PropMotifWmHints; |
PropMotifWmHints; |
102 |
|
|
138 |
XDrawArc(g_display, g_backstore, g_gc, x, y, cx, cy, 0, 360*64); \ |
XDrawArc(g_display, g_backstore, g_gc, x, y, cx, cy, 0, 360*64); \ |
139 |
break; \ |
break; \ |
140 |
case 1: /* Filled */ \ |
case 1: /* Filled */ \ |
141 |
XFillArc(g_display, g_ownbackstore ? g_backstore : g_wnd, g_gc, x, y, \ |
XFillArc(g_display, g_wnd, g_gc, x, y, cx, cy, 0, 360*64); \ |
|
cx, cy, 0, 360*64); \ |
|
142 |
if (g_ownbackstore) \ |
if (g_ownbackstore) \ |
143 |
XCopyArea(g_display, g_backstore, g_wnd, g_gc, x, y, cx, cy, x, y); \ |
XFillArc(g_display, g_backstore, g_gc, x, y, cx, cy, 0, 360*64); \ |
144 |
break; \ |
break; \ |
145 |
} \ |
} \ |
146 |
} |
} |
1091 |
else if (g_width < 0) |
else if (g_width < 0) |
1092 |
{ |
{ |
1093 |
/* Percent of screen */ |
/* Percent of screen */ |
1094 |
|
if (-g_width >= 100) |
1095 |
|
g_using_full_workarea = True; |
1096 |
g_height = HeightOfScreen(g_screen) * (-g_width) / 100; |
g_height = HeightOfScreen(g_screen) * (-g_width) / 100; |
1097 |
g_width = WidthOfScreen(g_screen) * (-g_width) / 100; |
g_width = WidthOfScreen(g_screen) * (-g_width) / 100; |
1098 |
} |
} |
1100 |
{ |
{ |
1101 |
/* Fetch geometry from _NET_WORKAREA */ |
/* Fetch geometry from _NET_WORKAREA */ |
1102 |
uint32 x, y, cx, cy; |
uint32 x, y, cx, cy; |
1103 |
|
g_using_full_workarea = True; |
1104 |
|
|
1105 |
if (get_current_workarea(&x, &y, &cx, &cy) == 0) |
if (get_current_workarea(&x, &y, &cx, &cy) == 0) |
1106 |
{ |
{ |
1401 |
/* The title bar. */ |
/* The title bar. */ |
1402 |
if (xevent.type == ButtonPress) |
if (xevent.type == ButtonPress) |
1403 |
{ |
{ |
1404 |
if (!g_fullscreen && g_hide_decorations) |
if (!g_fullscreen && g_hide_decorations && !g_using_full_workarea) |
1405 |
{ |
{ |
1406 |
g_moving_wnd = True; |
g_moving_wnd = True; |
1407 |
g_move_x_offset = xevent.xbutton.x; |
g_move_x_offset = xevent.xbutton.x; |
2445 |
switch (text[i]) |
switch (text[i]) |
2446 |
{ |
{ |
2447 |
case 0xff: |
case 0xff: |
2448 |
if (i + 2 < length) |
/* At least two bytes needs to follow */ |
2449 |
cache_put_text(text[i + 1], text, text[i + 2]); |
if (i + 3 > length) |
|
else |
|
2450 |
{ |
{ |
2451 |
error("this shouldn't be happening\n"); |
warning("Skipping short 0xff command:"); |
2452 |
exit(1); |
for (j = 0; j < length; j++) |
2453 |
|
fprintf(stderr, "%02x ", text[j]); |
2454 |
|
fprintf(stderr, "\n"); |
2455 |
|
i = length = 0; |
2456 |
|
break; |
2457 |
} |
} |
2458 |
|
cache_put_text(text[i + 1], text, text[i + 2]); |
2459 |
|
i += 3; |
2460 |
|
length -= i; |
2461 |
/* this will move pointer from start to first character after FF command */ |
/* this will move pointer from start to first character after FF command */ |
2462 |
length -= i + 3; |
text = &(text[i]); |
|
text = &(text[i + 3]); |
|
2463 |
i = 0; |
i = 0; |
2464 |
break; |
break; |
2465 |
|
|
2466 |
case 0xfe: |
case 0xfe: |
2467 |
|
/* At least one byte needs to follow */ |
2468 |
|
if (i + 2 > length) |
2469 |
|
{ |
2470 |
|
warning("Skipping short 0xfe command:"); |
2471 |
|
for (j = 0; j < length; j++) |
2472 |
|
fprintf(stderr, "%02x ", text[j]); |
2473 |
|
fprintf(stderr, "\n"); |
2474 |
|
i = length = 0; |
2475 |
|
break; |
2476 |
|
} |
2477 |
entry = cache_get_text(text[i + 1]); |
entry = cache_get_text(text[i + 1]); |
2478 |
if (entry != NULL) |
if (entry->data != NULL) |
2479 |
{ |
{ |
2480 |
if ((((uint8 *) (entry->data))[1] == |
if ((((uint8 *) (entry->data))[1] == 0) |
2481 |
0) && (!(flags & TEXT2_IMPLICIT_X))) |
&& (!(flags & TEXT2_IMPLICIT_X)) && (i + 2 < length)) |
2482 |
{ |
{ |
2483 |
if (flags & TEXT2_VERTICAL) |
if (flags & TEXT2_VERTICAL) |
2484 |
y += text[i + 2]; |
y += text[i + 2]; |