Dnd and resize [was pygtk DnD and resize]



I've just realized that it's not only with pygtk, cause a simple
test in C works the same (I think wrong) way.

Is this a bug in Gtk (checked with 2.4.1)?

Thanks,

Andre

On Tue, 11.05.2004 at 08:09 PM, Andre Lerche wrote:
Hi!

I've a bit of a problem while programming with pygtk and I'll try
to explain it with the following little sample application:

#!/usr/bin/env python
import pygtk
import gtk as g

class dragTest (g.Window):
    def __init__(self):
    g.Window.__init__(self)
    self.set_size_request(100,100)
    self.__motion=False
    self.show()

    target = [("text/uri-list", 0, 0)]
    self.drag_dest_set(g.DEST_DEFAULT_ALL, target, g.gdk.ACTION_COPY)
    self.connect("drag-motion", self.dragMotion, None)
    self.connect("drag-leave", self.dragLeave, None)
    self.connect("destroy", g.main_quit)
    g.main()

    def dragMotion (self, widget, context, x, y, time, data):
        if not self.__motion:
            self.__motion = True
            self.set_size_request(300,300)
            self.queue_draw()
            while g.events_pending():
                g.main_iteration()
 
        print "Motion"

    def dragLeave (self, widget, context, time, data):
        print "Leave"

dragTest()

If I drag something over the window, the window gets resized to 300x300.
But if I move the "dragobject" out of the old 100x100 area, dragLeave
is called and dragMotion stops - why? Normally I thought that dragLeave
is called when I move the "dragobject" out of the 300x300 window or am
I wrong and/or miss some functions to announce the new window size?

It's pygtk 2.3.91 with Gtk 2.4.0

Thanks,

Andre
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

-- 
Created on Setting Orange, the 62nd day of Discord in the YOLD 3170
Linux 2.6.2 i686
Please don't send attachments in secret proprietary formats like
MS-Word, MS-Excel, MS-Powerpoint, etc. - send HTML, PDF or plain text
See http://www.fsf.org/philosophy/no-word-attachments.html
======================================================================



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