title: Right click menu opens far away from clicked place
body: <p>I have a canvas. When I right click on it:</p>
  
  <ol>
  <li>It returns me coords where I've clicked, that's ok;</li>
  <li>Opens popup menu with some functions, <strong>but far away (left - up) and that is a main problem</strong>. That's not ok;</li>
  </ol>
  
  <p>I want this menu to open next to the place I've just right clicked (Up-right from the place where mouse clicked). </p>
  
  <p>How should I specify to it where to open this menu or maybe I need to change some attributes?</p>
  
  <pre><code>from tkinter import *
  from tkinter import ttk # for Treeview
  
  
  class Main(Frame):
      def __init__(self, main):
          Frame.__init__(self, main)
          # Vars that will be defined by user:
          self.frame_width = 300
          self.frame_height = 300
          self.canvas_width = 600
          self.canvas_height = 600
  
          # Flexible widgets when window size alters:
          main.columnconfigure(0, weight=1)
          main.rowconfigure(0, weight=1)
  
          # Some text
          Label(text='Some text 1').grid(row=0, column=0)
          Label(text='Some text 2').grid(row=1, column=0)
          Label(text='Some text 3').grid(row=2, column=0)
          Label(text='Some text 4').grid(row=3, column=0)
          Label(text='Some text 5').grid(row=4, column=0)
  
          # Canvas and frame
          canvas_frame = Frame(main, width=self.frame_width, height=self.frame_height, relief='groove')
          canvas_frame.grid(row=1, column=1)
          canvas_frame.grid_propagate(False)
          self.canvas = Canvas(canvas_frame, width = self.canvas_width, height = self.canvas_height,
                          bg='bisque')
          self.canvas.grid(row=0, column=0)
  
          # (!!!) RIGHT CLICK MENU
          self.rmenu = Menu(self.canvas, tearoff=0, takefocus=0)
          self.rmenu.add_command(label='Add', command=self.hello)
          self.canvas.bind("&lt;ButtonPress-3&gt;", self.popup)
  
          # Bind
          self.canvas.bind("&lt;ButtonPress-1&gt;", self.scroll_start)
          self.canvas.bind("&lt;B1-Motion&gt;", self.scroll_move)
  
          # Functions
          self.grid(self.canvas)
      # End of init function.
  
  
      # canvas popup menu: --------------------------------------------------
      # (!!!) HERE IS THE POPUP RIGHTCLICK MENU FUNCTIONS
      def popup(self, event):
          self.rmenu.tk_popup(event.x + 40, event.y + 10, entry="0")
          coords_1 = []
          coords_1 += [[event.x, event.y]]
          print(coords_1)
  
      def hello(self):
          print('hello')
  
      # grid:  --------------------------------------------------
  
      def grid(self, canvas):
          for l in range(0, self.canvas_width, 10):
              canvas.create_line([(l, 0), (l, self.canvas_width)], fill='#d9d9d9')
          for l in range(0, self.canvas_height, 10):
              canvas.create_line([(0, l), (self.canvas_height, l)], fill='#d9d9d9')
  
      # scrolling canvas: ----------------------------------------
  
      def scroll_start(self, event):
          self.canvas.scan_mark(event.x, event.y)
  
      def scroll_move(self, event):
          self.canvas.scan_dragto(event.x, event.y, gain=1)
  
  
  
  if __name__ == '__main__':
      main = Tk()
      # Making window opens in the centre of the screen
      w = 800
      h = 650
      ws = main.winfo_screenwidth()
      hs = main.winfo_screenheight()
      x = (ws / 2) - (w / 2)
      y = (hs / 2) - (h / 2)
      main.geometry('%dx%d+%d+%d' % (800, 600, x, y))
      #
      Main(main)
      main.mainloop()
  </code></pre>
  
  <p>All necessary parts I pointed out with (!!!) and uppercase text</p>