1. 30 Jun, 2010 1 commit
  2. 29 Jun, 2010 2 commits
  3. 27 Jun, 2010 2 commits
  4. 25 May, 2010 1 commit
  5. 14 May, 2010 1 commit
  6. 12 May, 2010 1 commit
  7. 04 Apr, 2010 5 commits
    • Kristian Rietveld's avatar
      Improve enter/motion notify semantics · a86bbf75
      Kristian Rietveld authored
      On X11 we receive enter notify and motion notify events for a window
      regardless of its focus state.  On Mac OS X this is not the case.  This
      commit improves the semantics to overcome this difference.  It improves
      on my earlier patch that sent a motion notify event when a window became
      main.
      
      Instead of sending a motion notify when a window becomes main, we now
      send one when a window becomes key, which comes closest to a window
      getting focus in X11.  This motion notify is needed because Mac OS X does
      not send motion events when an application is inactive (none of its
      windows have focus), these events are sent in X11.  This dummy motion
      notify event (with current coordinates of the mouse cursor) allows an
      application to get its prelight and other state right when it gets focus
      and thus user attention.
      
      Another change is to send an enter notify event when updating the
      tracking rectangle of a GdkQuartView and the mouse cursor is currently in
      this rectangle.  This rectangle is at least updated on window creation.
      This enter notify event is important for the case where a new window
      appears right below the mouse cursor.  The window has to receive an enter
      notify event for the subsequent events to be processed correctly.  Mac
      OS X does not send one in this case, so we generate it ourselves.
      
      Both of these synthesized events have to go through
      _gdk_windowing_got_event() for updating statekeeping, etc.
      append_event() has a boolean flag now to make this convenient.
      a86bbf75
    • Kristian Rietveld's avatar
      Release view after setting it as contentView · b8fa675a
      Kristian Rietveld authored
      Fixes GdkQuartzView being leaked.
      b8fa675a
    • Kristian Rietveld's avatar
      Fix memleak in get_nsscreen_for_point() · 969ff4c8
      Kristian Rietveld authored
      One codepath did not go through GDK_QUARTZ_RELEASE_POOL, refactored
      the code to fix this.
      969ff4c8
    • Kristian Rietveld's avatar
      Start using CGFloat · f7daeec1
      Kristian Rietveld authored
      Fixes a bunch of compiler warnings.  Since CGFloat does not exist on
      Tiger and earlier, we have added a typedef likewise as was done for
      NSInteger.
      f7daeec1
    • Kristian Rietveld's avatar
      Start using NSInteger and NSUInteger · e9b593c2
      Kristian Rietveld authored
      These have been introduced in Leopard and default to int and unsigned int.
      In 64-bit Snow Leopard they are long and unsigned long.  This caused issues
      with the getRectsBeingDrawn message which needs a pointer to a NSInteger
      (long on 64-bit!) but we passed in an integer.  Surprisingly this problem
      was visible when compiling with -O0 (segfault), but *not* when compiling
      with -O1.  Other messages were NSInteger is now needed have also been
      adapted.
      
      Since NSInteger and NSUInteger are not available on Tiger, a define
      has been added to add typedefs for these when they have not been defined
      by the system headers.
      e9b593c2
  8. 30 Jan, 2010 1 commit
    • Kristian Rietveld's avatar
      Improve enter/motion notify semantics · 66207cf1
      Kristian Rietveld authored
      On X11 we receive enter notify and motion notify events for a window
      regardless of its focus state.  On Mac OS X this is not the case.  This
      commit improves the semantics to overcome this difference.  It improves
      on my earlier patch that sent a motion notify event when a window became
      main.
      
      Instead of sending a motion notify when a window becomes main, we now
      send one when a window becomes key, which comes closest to a window
      getting focus in X11.  This motion notify is needed because Mac OS X does
      not send motion events when an application is inactive (none of its
      windows have focus), these events are sent in X11.  This dummy motion
      notify event (with current coordinates of the mouse cursor) allows an
      application to get its prelight and other state right when it gets focus
      and thus user attention.
      
      Another change is to send an enter notify event when updating the
      tracking rectangle of a GdkQuartView and the mouse cursor is currently in
      this rectangle.  This rectangle is at least updated on window creation.
      This enter notify event is important for the case where a new window
      appears right below the mouse cursor.  The window has to receive an enter
      notify event for the subsequent events to be processed correctly.  Mac
      OS X does not send one in this case, so we generate it ourselves.
      
      Both of these synthesized events have to go through
      _gdk_windowing_got_event() for updating statekeeping, etc.
      append_event() has a boolean flag now to make this convenient.
      66207cf1
  9. 30 Dec, 2009 2 commits
  10. 28 Dec, 2009 1 commit
    • Kristian Rietveld's avatar
      Start using CGFloat · c8fef502
      Kristian Rietveld authored
      Fixes a bunch of compiler warnings.  Since CGFloat does not exist on
      Tiger and earlier, we have added a typedef likewise as was done for
      NSInteger.
      c8fef502
  11. 27 Dec, 2009 1 commit
    • Kristian Rietveld's avatar
      Start using NSInteger and NSUInteger · b2b70e5a
      Kristian Rietveld authored
      These have been introduced in Leopard and default to int and unsigned int.
      In 64-bit Snow Leopard they are long and unsigned long.  This caused issues
      with the getRectsBeingDrawn message which needs a pointer to a NSInteger
      (long on 64-bit!) but we passed in an integer.  Surprisingly this problem
      was visible when compiling with -O0 (segfault), but *not* when compiling
      with -O1.  Other messages were NSInteger is now needed have also been
      adapted.
      
      Since NSInteger and NSUInteger are not available on Tiger, a define
      has been added to add typedefs for these when they have not been defined
      by the system headers.
      b2b70e5a
  12. 15 Nov, 2009 1 commit
  13. 26 Oct, 2009 4 commits
    • Kristian Rietveld's avatar
      Update position of toplevels after display reconfiguration · fa8fa48e
      Kristian Rietveld authored
      We have to do this, especially after the screen containing the menubar
      has changed.  Such more larger changes in monitor geometry will cause
      changes to how monitors are laid out in the root window.  The position
      coordinates of the windows will have to be updated to reflect their
      position in the new layout.
      fa8fa48e
    • Kristian Rietveld's avatar
      Fixup get_nsscreen_for_x() · a4d932cc
      Kristian Rietveld authored
      a4d932cc
    • Kristian Rietveld's avatar
    • Kristian Rietveld's avatar
      Rework coordinate transformation to be based on root window · 8846012c
      Kristian Rietveld authored
      The root window contains all the monitors attached to a Mac.  The
      coordinate transformation now both translates the x and y coordinate,
      translating it from the Cocoa monitor coordinate space to the GDK
      coordinate space.  How monitors are laid out in the root window differs
      between Cocoa and GDK, which is why it is important to translate based
      on the root window to get multi monitor setups to work properly.
      
      We have replaced the old y coordinate transformation function with
      new functions that translate both the x and y coordinate.
      
      When creating new toplevels, we have to determine the Cocoa screen on
      which the toplevel should appear and translate the coordinates according
      to that screen.
      
      This change also fixes event handling in case there is a monitor left
      of the screen containing the menu bar.  In such a case all coordinates
      on the left monitor are negative.  Event handling broke, because of
      _gdk_quartz_window_find_child() checking bounds.  Now that coordinates
      are always properly translated to GDK coordinate space, in which negative
      coordinates do never occur, the checks here will work properly.
      8846012c
  14. 23 Oct, 2009 1 commit
  15. 28 Sep, 2009 1 commit
    • Alexander Larsson's avatar
      Extend _gdk_windowing_window_at_pointer to be able to get toplevels only · 5ebb32d1
      Alexander Larsson authored
      This has two advantages:
      1) In many backends, this is faster as we can terminate the window
      hierarchy traversal earlier
      2) When used in gdkdisplay.c::get_current_toplevel() to get the
      current toplevel that has the pointer we now correctly return
      a toplevel with the pointer in it where the pointer is inside
      some foreign subwindow of a toplevel window.
      
      The second advantage fixes some bugs in client side event generation
      when the pointer is inside such a foreign child window.
      5ebb32d1
  16. 27 Sep, 2009 2 commits
    • Kristian Rietveld's avatar
      Remove unused variable · f2d9f5a9
      Kristian Rietveld authored
      f2d9f5a9
    • Kristian Rietveld's avatar
      Bug 596012 - popup menu position is horribly off on gdk quartz with ... · 2f782de1
      Kristian Rietveld authored
      Based on first patches by Christian Hergert.  Change
      screen_get_monitor_geometry() so that it translates the layout of the screens
      from Cocoa layout to GDK layout.  In Cocoa, the screen locations
      are specified in Cocoa geometry, as well as that GDK uses a different way
      to place individual monitors in the root window.  For now only monitors
      that are laid out horizontally are supported (see the FIXMEs in the source),
      in bug 596238 we will track future work to get things fully right.
      
      Modify _gdk_quartz_window_get_inverted_screen_y() to take the differences
      in screen layout between Cocoa and GDK into account.  Also this function
      is subject to future work.
      2f782de1
  17. 25 Sep, 2009 1 commit
  18. 21 Sep, 2009 1 commit
  19. 16 Sep, 2009 1 commit
    • Kristian Rietveld's avatar
      Assign the size of the screen to the root window · d797dcc4
      Kristian Rietveld authored
      On startup, the root window got assigned the size of the main screen.
      But, the GdkScreen has the width of all screens/monitors connected to the
      machine.  Change this so that in _gdk_windowing_window_init, we assign
      the width/height of all monitors to the root window width, height.
      Should fix bug 594738.
      d797dcc4
  20. 02 Sep, 2009 1 commit
    • Alexander Larsson's avatar
      Add gdk_window_restack · d67a7eda
      Alexander Larsson authored
      This lets you restack a window above or below a specified sibling.
      At least eclipse wants this functionallity.
      d67a7eda
  21. 07 Aug, 2009 2 commits
  22. 31 Jul, 2009 1 commit
  23. 18 Jul, 2009 1 commit
  24. 20 Jun, 2009 2 commits
  25. 02 Apr, 2009 3 commits