title: Pygame window resizing isn't working correctly
body: <p>I'm trying to make a resizable window in pygame. However, it's been resizing randomly and incorrectly.</p>
  
  <p>I have two files, this is the one that runs the main loop:</p>
  
  <pre><code>import eaterConstants
  
  Screen = eaterConstants.Screen([400,400])
  while True:
      Screen.getGlobalInput()
  </code></pre>
  
  <p>This is the relevant class that is referenced in the first file:</p>
  
  <pre><code>class Screen():
      def __init__(self,size):
          self.screen = pygame.display.set_mode(size,pygame.RESIZABLE|pygame.DOUBLEBUF)
          self.updated = False
  
      def getGlobalInput(self):
          for event in pygame.event.get():
              if event.type == VIDEORESIZE:
                  self.resize(event)
              if event.type == QUIT:
                  pygame.quit()
                  sys.exit()
          self.update()
  
      def resize(self,event):
          self.screen = pygame.display.set_mode(event.size,pygame.RESIZABLE|pygame.DOUBLEBUF)
          self.updated = False
  
      def update(self):
          if self.updated == False:
              pygame.display.flip()
              self.updated = True
  </code></pre>
  
  <p>This is what the problem looks like generally speaking:
  <a href="https://youtu.be/HBFz-yeEpdU" rel="nofollow noreferrer">https://youtu.be/HBFz-yeEpdU</a></p>
  
  <p>The expected result is that of any other window you could have on your computer(try resizing your web browser for instance)</p>
  
  <p>I'm on linux 16.04. I don't know if that's relevant or not. </p>
  
  <p>Edit: Turns out that using (event.w, event.h) over event.size doesn't work. It still has the above posted jittering bug. </p>
  
  <p>Thanks for the help!</p>