mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 13:28:05 +01:00
small fixes.
This commit is contained in:
@@ -2673,8 +2673,6 @@ insertPlainText(Text *tPtr, char *text)
|
||||
else
|
||||
WMAppendTextBlock(tPtr, tb);
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2682,6 +2680,7 @@ static void
|
||||
rulerMoveCallBack(WMWidget *w, void *self)
|
||||
{
|
||||
Text *tPtr = (Text *)self;
|
||||
|
||||
if (!tPtr)
|
||||
return;
|
||||
if (W_CLASS(tPtr) != WC_Text)
|
||||
@@ -2695,6 +2694,7 @@ static void
|
||||
rulerReleaseCallBack(WMWidget *w, void *self)
|
||||
{
|
||||
Text *tPtr = (Text *)self;
|
||||
|
||||
if (!tPtr)
|
||||
return;
|
||||
if (W_CLASS(tPtr) != WC_Text)
|
||||
@@ -2717,7 +2717,7 @@ fetchDragData(WMView *self, char *type)
|
||||
char *desc;
|
||||
WMData *data;
|
||||
|
||||
if(!tb)
|
||||
if (!tb)
|
||||
return NULL;
|
||||
|
||||
printf("type is [%s]\n", type);
|
||||
@@ -2781,7 +2781,8 @@ badbadbad = wstrdup((char *)WMDataBytes(data));
|
||||
|
||||
/* when it's done in WINGs, remove this */
|
||||
|
||||
Bool requestDroppedData(WMView *view, WMDraggingInfo *info, char *type)
|
||||
Bool
|
||||
requestDroppedData(WMView *view, WMDraggingInfo *info, char *type)
|
||||
{
|
||||
WMScreen *scr = W_VIEW_SCREEN(view);
|
||||
|
||||
@@ -2790,25 +2791,24 @@ Bool requestDroppedData(WMView *view, WMDraggingInfo *info, char *type)
|
||||
XInternAtom(scr->display, type, False),
|
||||
scr->dragInfo.timestamp,
|
||||
receivedData, &scr->dragInfo)) {
|
||||
wwarning("could not request data for dropped data");
|
||||
|
||||
}
|
||||
wwarning("could not request data for dropped data");
|
||||
}
|
||||
|
||||
{
|
||||
XEvent ev;
|
||||
XEvent ev;
|
||||
|
||||
ev.type = ClientMessage;
|
||||
ev.xclient.message_type = scr->xdndFinishedAtom;
|
||||
ev.xclient.format = 32;
|
||||
ev.xclient.window = info->destinationWindow;
|
||||
ev.xclient.data.l[0] = 0;
|
||||
ev.xclient.data.l[1] = 0;
|
||||
ev.xclient.data.l[2] = 0;
|
||||
ev.xclient.data.l[3] = 0;
|
||||
ev.xclient.data.l[4] = 0;
|
||||
ev.type = ClientMessage;
|
||||
ev.xclient.message_type = scr->xdndFinishedAtom;
|
||||
ev.xclient.format = 32;
|
||||
ev.xclient.window = info->destinationWindow;
|
||||
ev.xclient.data.l[0] = 0;
|
||||
ev.xclient.data.l[1] = 0;
|
||||
ev.xclient.data.l[2] = 0;
|
||||
ev.xclient.data.l[3] = 0;
|
||||
ev.xclient.data.l[4] = 0;
|
||||
|
||||
XSendEvent(scr->display, info->sourceWindow, False, 0, &ev);
|
||||
XFlush(scr->display);
|
||||
XSendEvent(scr->display, info->sourceWindow, False, 0, &ev);
|
||||
XFlush(scr->display);
|
||||
}
|
||||
return True;
|
||||
}
|
||||
@@ -2980,16 +2980,11 @@ getStreamObjects(WMText *tPtr, int sel)
|
||||
|
||||
|
||||
WMText *
|
||||
WMCreateTextForDocumentType(WMWidget *parent,
|
||||
WMAction *parser, WMAction *writer)
|
||||
WMCreateTextForDocumentType(WMWidget *parent, WMAction *parser, WMAction *writer)
|
||||
{
|
||||
Text *tPtr = wmalloc(sizeof(Text));
|
||||
if (!tPtr) {
|
||||
printf("could not create text widget\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Text *tPtr;
|
||||
|
||||
tPtr = wmalloc(sizeof(Text));
|
||||
memset(tPtr, 0, sizeof(Text));
|
||||
tPtr->widgetClass = WC_Text;
|
||||
tPtr->view = W_CreateView(W_VIEW(parent));
|
||||
@@ -3202,8 +3197,8 @@ WMSetTextDelegate(WMText *tPtr, WMTextDelegate *delegate)
|
||||
|
||||
void *
|
||||
WMCreateTextBlockWithObject(WMText *tPtr, WMWidget *w,
|
||||
char *description, WMColor *color,
|
||||
unsigned short first, unsigned short extraInfo)
|
||||
char *description, WMColor *color,
|
||||
unsigned short first, unsigned short extraInfo)
|
||||
{
|
||||
TextBlock *tb;
|
||||
|
||||
@@ -3239,8 +3234,8 @@ WMCreateTextBlockWithObject(WMText *tPtr, WMWidget *w,
|
||||
|
||||
void *
|
||||
WMCreateTextBlockWithPixmap(WMText *tPtr, WMPixmap *p,
|
||||
char *description, WMColor *color,
|
||||
unsigned short first, unsigned short extraInfo)
|
||||
char *description, WMColor *color,
|
||||
unsigned short first, unsigned short extraInfo)
|
||||
{
|
||||
TextBlock *tb;
|
||||
|
||||
@@ -3273,9 +3268,10 @@ WMCreateTextBlockWithPixmap(WMText *tPtr, WMPixmap *p,
|
||||
return tb;
|
||||
}
|
||||
|
||||
void *
|
||||
|
||||
void*
|
||||
WMCreateTextBlockWithText(WMText *tPtr, char *text, WMFont *font, WMColor *color,
|
||||
unsigned short first, unsigned short len)
|
||||
unsigned short first, unsigned short len)
|
||||
{
|
||||
TextBlock *tb;
|
||||
|
||||
|
||||
@@ -414,6 +414,7 @@ destroyDrawString (proplist_t pl, WPluginData *init_data) {
|
||||
destroyDrawFreeTypeString(pl, init_data);
|
||||
}
|
||||
|
||||
#ifdef USE_FREETYPE
|
||||
void
|
||||
widthOfString (unsigned char *text, int length, WPluginData *func_data,
|
||||
int *width, int *height, int *top) {
|
||||
@@ -422,6 +423,7 @@ widthOfString (unsigned char *text, int length, WPluginData *func_data,
|
||||
data = ((WPluginData*)func_data->array[0])->array[2];
|
||||
data->strwidth(text, length, func_data, width, height, top);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
initDrawString (proplist_t pl, WPluginData *init_data) {
|
||||
|
||||
Reference in New Issue
Block a user