~bennabiy/+junk/python-xlib

« back to all changes in this revision

Viewing changes to examples/childwin.py

  • Committer: Package Import Robot
  • Author(s): Andrew Shadura, Ramkumar Ramachandra, Andrew Shadura
  • Date: 2015-08-13 08:14:19 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20150813081419-hdefinnghp2iydkx
Tags: 0.14+20091101-3
[ Ramkumar Ramachandra ]
* Remove useless debugging output (Closes: #565996)

[ Andrew Shadura ]
* Switch to 3.0 (quilt) format.
* Rename patches.
* Use debhelper 9 in its short form.
* Use pybuild.
* Bump Standards-Version.
* Don't build or install PostScript documentation and info files.
* Use system-provided texi2html instead of a shipped version
  (Closes: #795057).
* Update debian/copyright (Closes: #795057).
* Don't install Makefile or texi2html with the documentation.
* Set executable bit for examples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
 
55
55
                bggc.change(foreground=self.screen.white_pixel)
56
56
 
57
 
                bgpm.arc(bggc, -bgsize / 2, 0, bgsize, bgsize, 0, 360 * 64)
58
 
                bgpm.arc(bggc, bgsize / 2, 0, bgsize, bgsize, 0, 360 * 64)
59
 
                bgpm.arc(bggc, 0, -bgsize / 2, bgsize, bgsize, 0, 360 * 64)
60
 
                bgpm.arc(bggc, 0, bgsize / 2, bgsize, bgsize, 0, 360 * 64)
 
57
                bgpm.arc(bggc, -bgsize // 2, 0, bgsize, bgsize, 0, 360 * 64)
 
58
                bgpm.arc(bggc, bgsize // 2, 0, bgsize, bgsize, 0, 360 * 64)
 
59
                bgpm.arc(bggc, 0, -bgsize // 2, bgsize, bgsize, 0, 360 * 64)
 
60
                bgpm.arc(bggc, 0, bgsize // 2, bgsize, bgsize, 0, 360 * 64)
61
61
 
62
62
                # Actual window
63
63
                self.window = self.screen.root.create_window(
127
127
                        # Button released, add or subtract
128
128
                        elif e.type == X.ButtonRelease:
129
129
                                if e.detail == 1:
130
 
                                        print "Moving child window."
 
130
                                        print("Moving child window.")
131
131
                                        self.childWindow.configure(
132
 
                                                x=e.event_x - self.childWidth / 2,
133
 
                                                y=e.event_y - self.childHeight / 2
 
132
                                                x=e.event_x - self.childWidth // 2,
 
133
                                                y=e.event_y - self.childHeight // 2
134
134
                                                )
135
135
                                        self.d.flush()
136
136