fixes from ArvidNorr
This commit is contained in:
parent
9a03ab966d
commit
3e422c04c6
@ -187,6 +187,10 @@ convert_bitmap(int in_bpp, int out_bpp, char* bmpdata,
|
||||
{
|
||||
return bmpdata;
|
||||
}
|
||||
if ((in_bpp == 15) && (out_bpp == 15))
|
||||
{
|
||||
return bmpdata;
|
||||
}
|
||||
g_writeln("convert_bitmap: error unknown conversion from %d to %d",
|
||||
in_bpp, out_bpp);
|
||||
return 0;
|
||||
@ -265,6 +269,10 @@ convert_color(int in_bpp, int out_bpp, int in_color, int* palette)
|
||||
{
|
||||
return in_color;
|
||||
}
|
||||
if ((in_bpp == 15) && (out_bpp == 15))
|
||||
{
|
||||
return in_color;
|
||||
}
|
||||
g_writeln("convert_color: error unknown conversion from %d to %d",
|
||||
in_bpp, out_bpp);
|
||||
return 0;
|
||||
|
@ -139,22 +139,17 @@ lib_mod_event(struct mod* mod, int msg, long param1, long param2,
|
||||
param1, param2);
|
||||
break;
|
||||
case 107:
|
||||
//mod->inst->rdp_send_input_mouse(mod->inst,
|
||||
// MOUSE_FLAG_BUTTON4, param1, param2);
|
||||
mod->inst->rdp_send_input_mouse(mod->inst,
|
||||
PTRFLAGS_WHEEL | 0x0078, 0, 0);
|
||||
break;
|
||||
case 108:
|
||||
//mod->inst->rdp_send_input_mouse(mod->inst,
|
||||
// MOUSE_FLAG_BUTTON4 | MOUSE_FLAG_DOWN,
|
||||
// param1, param2);
|
||||
break;
|
||||
case 109:
|
||||
//mod->inst->rdp_send_input_mouse(mod->inst,
|
||||
// MOUSE_FLAG_BUTTON5, param1, param2);
|
||||
mod->inst->rdp_send_input_mouse(mod->inst,
|
||||
PTRFLAGS_WHEEL |
|
||||
PTRFLAGS_WHEEL_NEGATIVE | 0x0088, 0, 0);
|
||||
break;
|
||||
case 110:
|
||||
//mod->inst->rdp_send_input_mouse(mod->inst,
|
||||
// MOUSE_FLAG_BUTTON5 | MOUSE_FLAG_DOWN,
|
||||
// param1, param2);
|
||||
break;
|
||||
}
|
||||
LIB_DEBUG(mod, "out lib_mod_event");
|
||||
|
@ -375,9 +375,8 @@ xrdp_mm_setup_mod2(struct xrdp_mm* self)
|
||||
int device_flags;
|
||||
int use_uds;
|
||||
|
||||
g_memset(text,0,sizeof(char) * 256);
|
||||
rv = 1;
|
||||
text[0] = 0;
|
||||
rv = 1; /* failure */
|
||||
g_memset(text, 0, sizeof(text));
|
||||
if (!g_is_wait_obj_set(self->wm->pro_layer->self_term_event))
|
||||
{
|
||||
if (self->mod->mod_start(self->mod, self->wm->screen->width,
|
||||
@ -444,7 +443,7 @@ xrdp_mm_setup_mod2(struct xrdp_mm* self)
|
||||
/* connect */
|
||||
if (self->mod->mod_connect(self->mod) == 0)
|
||||
{
|
||||
rv = 0;
|
||||
rv = 0; /* connect success */
|
||||
}
|
||||
}
|
||||
if (rv == 0)
|
||||
@ -953,11 +952,12 @@ xrdp_mm_connect(struct xrdp_mm* self)
|
||||
char port[8];
|
||||
char chansrvport[256];
|
||||
|
||||
g_memset(ip,0,sizeof(char) * 256);
|
||||
g_memset(errstr,0,sizeof(char) * 256);
|
||||
g_memset(text,0,sizeof(char) * 256);
|
||||
g_memset(port,0,sizeof(char) * 8);
|
||||
rv = 0;
|
||||
g_memset(ip, 0, sizeof(ip));
|
||||
g_memset(errstr, 0, sizeof(errstr));
|
||||
g_memset(text, 0, sizeof(text));
|
||||
g_memset(port, 0, sizeof(port));
|
||||
g_memset(chansrvport, 0, sizeof(chansrvport));
|
||||
rv = 0; /* success */
|
||||
use_sesman = 0;
|
||||
names = self->login_names;
|
||||
values = self->login_values;
|
||||
@ -1033,6 +1033,14 @@ xrdp_mm_connect(struct xrdp_mm* self)
|
||||
{
|
||||
xrdp_wm_set_login_mode(self->wm, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* connect error */
|
||||
g_snprintf(errstr, 255, "Failure to connect to: %s port: %s",
|
||||
ip, port);
|
||||
xrdp_wm_log_msg(self->wm, errstr);
|
||||
rv = 1 ; /* failure */
|
||||
}
|
||||
}
|
||||
if (self->wm->login_mode != 10)
|
||||
{
|
||||
|
@ -1475,10 +1475,16 @@ xrdp_wm_login_mode_changed(struct xrdp_wm* self)
|
||||
}
|
||||
else if (self->login_mode == 2)
|
||||
{
|
||||
xrdp_wm_set_login_mode(self, 3); /* put the wm in connected mode */
|
||||
xrdp_wm_delete_all_childs(self);
|
||||
self->dragging = 0;
|
||||
xrdp_mm_connect(self->mm);
|
||||
if (xrdp_mm_connect(self->mm) == 0)
|
||||
{
|
||||
xrdp_wm_set_login_mode(self, 3); /* put the wm in connected mode */
|
||||
xrdp_wm_delete_all_childs(self);
|
||||
self->dragging = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* we do nothing on connect error so far */
|
||||
}
|
||||
}
|
||||
else if (self->login_mode == 10)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user