forked from pyrite-dev/milsko
fix for gdi case
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@660 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
c81dc334b0
commit
d96b74c1b1
3 changed files with 7 additions and 8 deletions
|
|
@ -83,8 +83,7 @@ static int create(MwWidget handle) {
|
||||||
attribs[3] = 24;
|
attribs[3] = 24;
|
||||||
attribs[4] = None;
|
attribs[4] = None;
|
||||||
|
|
||||||
while(glpath[glincr] != NULL && (o->lib = dlopen(glpath[glincr++], RTLD_LAZY)) == NULL)
|
while(glpath[glincr] != NULL && (o->lib = dlopen(glpath[glincr++], RTLD_LAZY)) == NULL);
|
||||||
;
|
|
||||||
|
|
||||||
o->glXChooseVisual = (MWglXChooseVisual)dlsym(o->lib, "glXChooseVisual");
|
o->glXChooseVisual = (MWglXChooseVisual)dlsym(o->lib, "glXChooseVisual");
|
||||||
o->glXCreateContext = (MWglXCreateContext)dlsym(o->lib, "glXCreateContext");
|
o->glXCreateContext = (MWglXCreateContext)dlsym(o->lib, "glXCreateContext");
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ static void draw(MwWidget handle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mouse_move(MwWidget handle) {
|
static void mouse_move(MwWidget handle) {
|
||||||
int or = MwGetInteger(handle, MwNorientation);
|
int or = MwGetInteger(handle, MwNorientation);
|
||||||
scrollbar_t* scr = handle->internal;
|
scrollbar_t* scr = handle->internal;
|
||||||
|
|
||||||
if(!handle->pressed) return;
|
if(!handle->pressed) return;
|
||||||
|
|
@ -158,9 +158,9 @@ static void mouse_move(MwWidget handle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mouse_down(MwWidget handle, void* ptr) {
|
static void mouse_down(MwWidget handle, void* ptr) {
|
||||||
int ww = MwGetInteger(handle, MwNwidth);
|
int ww = MwGetInteger(handle, MwNwidth);
|
||||||
int wh = MwGetInteger(handle, MwNheight);
|
int wh = MwGetInteger(handle, MwNheight);
|
||||||
int or = MwGetInteger(handle, MwNorientation);
|
int or = MwGetInteger(handle, MwNorientation);
|
||||||
scrollbar_t* scr = handle->internal;
|
scrollbar_t* scr = handle->internal;
|
||||||
MwLLMouse* m = ptr;
|
MwLLMouse* m = ptr;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,8 @@ static void mwSubMenuAppearImpl(MwWidget handle, MwMenu menu, MwPoint* point) {
|
||||||
|
|
||||||
handle->internal = menu;
|
handle->internal = menu;
|
||||||
|
|
||||||
|
MwLLDetach(handle->lowlevel, point);
|
||||||
|
|
||||||
#ifdef USE_GDI
|
#ifdef USE_GDI
|
||||||
SetWindowLongPtr(handle->lowlevel->hWnd, GWL_STYLE, (LPARAM)0);
|
SetWindowLongPtr(handle->lowlevel->hWnd, GWL_STYLE, (LPARAM)0);
|
||||||
SetWindowLongPtr(handle->lowlevel->hWnd, GWL_EXSTYLE, (LPARAM)WS_EX_TOOLWINDOW);
|
SetWindowLongPtr(handle->lowlevel->hWnd, GWL_EXSTYLE, (LPARAM)WS_EX_TOOLWINDOW);
|
||||||
|
|
@ -167,8 +169,6 @@ static void mwSubMenuAppearImpl(MwWidget handle, MwMenu menu, MwPoint* point) {
|
||||||
|
|
||||||
MwLLShow(handle->lowlevel, 1);
|
MwLLShow(handle->lowlevel, 1);
|
||||||
|
|
||||||
MwLLDetach(handle->lowlevel, point);
|
|
||||||
|
|
||||||
for(i = 0; i < arrlen(menu->sub); i++) {
|
for(i = 0; i < arrlen(menu->sub); i++) {
|
||||||
int tw = MwTextWidth(handle, menu->sub[i]->name);
|
int tw = MwTextWidth(handle, menu->sub[i]->name);
|
||||||
h += MwTextHeight(handle, menu->sub[i]->name) + 3;
|
h += MwTextHeight(handle, menu->sub[i]->name) + 3;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue