mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
Allow non-resizable windows to be resized programmatically.
Clean up compiler warnings. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25527 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
901c5b758c
commit
18f790a690
5 changed files with 35 additions and 13 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2007-10-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/x11/XGServerWindow.m (-placewindow:): Change window to be
|
||||
temporary resizable. Patch by Wolfgang Lux <wolfgang.lux@gmail.com>.
|
||||
* Source/x11/XIMInputServer.m: Clean up includes to avoid compiler warning.
|
||||
* Source/x11/raster.c (calculateCombineArea): Change parameter
|
||||
signedness to avoid compiler warnings.
|
||||
* Source/x11/convert.c (convertTrueColor_generic,
|
||||
convertPseudoColor_to_8): Change parameter signedness to avoid compiler warnings.
|
||||
|
||||
2007-10-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/cairo/CairoFontInfo.m
|
||||
|
|
|
@ -2935,6 +2935,18 @@ static BOOL didCreatePixmaps;
|
|||
move = YES;
|
||||
}
|
||||
|
||||
/* Temporarily remove minimum and maximum window size hints to make
|
||||
* the window resizable programatically.
|
||||
*/
|
||||
if (window->siz_hints.flags & (PMinSize | PMaxSize))
|
||||
{
|
||||
long flags = window->siz_hints.flags;
|
||||
|
||||
window->siz_hints.flags &= ~(PMinSize | PMaxSize);
|
||||
XSetWMNormalHints(dpy, window->ident, &window->siz_hints);
|
||||
window->siz_hints.flags = flags;
|
||||
}
|
||||
|
||||
xVal = [self _OSFrameToXFrame: rect for: window];
|
||||
xHint = [self _XFrameToXHints: xVal for: window];
|
||||
window->siz_hints.width = (int)xHint.size.width;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <Foundation/NSException.h>
|
||||
#include <GNUstepBase/Unicode.h>
|
||||
#include <AppKit/NSWindow.h>
|
||||
#include <GNUstepGUI/GSFontInfo.h>
|
||||
#include <AppKit/NSView.h>
|
||||
|
||||
#include "x11/XGInputServer.h"
|
||||
#include <X11/Xlocale.h>
|
||||
|
|
|
@ -140,9 +140,9 @@ computeStdTable(unsigned int mult, unsigned int max)
|
|||
static void
|
||||
convertTrueColor_generic(RXImage *ximg, RImage *image,
|
||||
signed char *err, signed char *nerr,
|
||||
const short *rtable,
|
||||
const short *gtable,
|
||||
const short *btable,
|
||||
const unsigned short *rtable,
|
||||
const unsigned short *gtable,
|
||||
const unsigned short *btable,
|
||||
const int dr, const int dg, const int db,
|
||||
const unsigned short roffs,
|
||||
const unsigned short goffs,
|
||||
|
@ -342,8 +342,8 @@ image2TrueColor(RContext *ctx, RImage *image)
|
|||
puts("true color dither");
|
||||
#endif
|
||||
{
|
||||
char *err;
|
||||
char *nerr;
|
||||
signed char *err;
|
||||
signed char *nerr;
|
||||
int ch = (image->format == RRGBAFormat ? 4 : 3);
|
||||
|
||||
err = malloc(ch*(image->width+2));
|
||||
|
@ -381,9 +381,9 @@ image2TrueColor(RContext *ctx, RImage *image)
|
|||
static void
|
||||
convertPseudoColor_to_8(RXImage *ximg, RImage *image,
|
||||
signed char *err, signed char *nerr,
|
||||
const short *rtable,
|
||||
const short *gtable,
|
||||
const short *btable,
|
||||
const unsigned short *rtable,
|
||||
const unsigned short *gtable,
|
||||
const unsigned short *btable,
|
||||
const int dr, const int dg, const int db,
|
||||
unsigned long *pixels,
|
||||
int cpc)
|
||||
|
@ -393,7 +393,7 @@ convertPseudoColor_to_8(RXImage *ximg, RImage *image,
|
|||
int pixel;
|
||||
int rer, ger, ber;
|
||||
unsigned char *ptr = image->data;
|
||||
unsigned char *optr = ximg->image->data;
|
||||
unsigned char *optr = (unsigned char *)ximg->image->data;
|
||||
int channels = (image->format == RRGBAFormat ? 4 : 3);
|
||||
int cpcpc = cpc*cpc;
|
||||
|
||||
|
@ -507,8 +507,8 @@ image2PseudoColor(RContext *ctx, RImage *image)
|
|||
}
|
||||
} else {
|
||||
/* dither */
|
||||
char *err;
|
||||
char *nerr;
|
||||
signed char *err;
|
||||
signed char *nerr;
|
||||
const int dr=0xff/rmask;
|
||||
const int dg=0xff/gmask;
|
||||
const int db=0xff/bmask;
|
||||
|
|
|
@ -299,7 +299,7 @@ RCombineImagesWithOpaqueness(RImage *image, RImage *src, int opaqueness)
|
|||
|
||||
int
|
||||
calculateCombineArea(RImage *des, RImage *src, int *sx, int *sy,
|
||||
int *swidth, int *sheight, int *dx, int *dy)
|
||||
unsigned *swidth, unsigned *sheight, int *dx, int *dy)
|
||||
{
|
||||
if (*dx < 0) {
|
||||
*sx = -*dx;
|
||||
|
|
Loading…
Reference in a new issue