[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: date DND

Hash: SHA1

On Tuesday 22 July 2003 00:34, Owen Taylor wrote:
> On Mon, 2003-07-21 at 18:11, Waldo Bastian wrote:
> > Hash: SHA1
> >
> > On Monday 21 July 2003 23:58, John Meacham wrote:
> > > I would very much like to see this on freedesktop.org. DND can be used
> > > for a lot of interesting things besides files, and can simplify UIs
> > > considerably. for example, I would really like to see a standard DND
> > > type for dragging and dropping colors and all color selection widgets
> > > should be able to recieve and provide such dnd items. an app which
> > > acted like a palette to drag colors off of to customize other apps with
> > > a consistant color scheme would be very cool.
> > >         John
> >
> > application/x-color is actually supported by both Gtk and Qt/KDE already.
> >
> > You may like KColorChooser that comes with KDE.
> Hmmm, drops into GTK+ from KColorChooser don't seem to work.
> (testgtk:8556): Gtk-WARNING **: Received invalid color data
> (gdb) p data.format
> $14 = 8
> (gdb) p data.length
> $14 = 8
> The contents look like little-endian 16 bit data, so I wonder
> KColorChooser can DND to itself across endian properly?

Amazing how people manage to interpret such a simple spec still quite 
differently :-}

I'm not really very deep into this stuff, but Qt does:
        XChangeProperty ( QPaintDevice::x11AppDisplay(), req->requestor, 
                          req->target, 8, PropModeReplace,
                          (unsigned char *)a.data(), a.size() );

And a.data() essentially refers to ushort[4] so I don't think kcolorchooser 
has a chance of working across endianness.

Does the 8 in the XChangeProperty call refer to your data.format above? Would 
there be some sort of endian-conversion if it was 16? Where?

What is surprising (frightening?) is that the code in KDE is from 1999 and has 
as comment: // A short int for each of R G B Alpha (compatible with gtk);

- -- 
bastian kde org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian suse com
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]