Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 388757 - Use gtk_render_handle() instead of gtk_paint_handle() for GTK+ 3
Summary: Use gtk_render_handle() instead of gtk_paint_handle() for GTK+ 3
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.3 M3   Edit
Assignee: Alexander Kurtakov CLA
QA Contact:
URL:
Whiteboard: gtk3test
Keywords:
Depends on:
Blocks: 340067
  Show dependency tree
 
Reported: 2012-09-04 11:21 EDT by Anatoly Spektor CLA
Modified: 2012-10-08 06:43 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anatoly Spektor CLA 2012-09-04 11:21:34 EDT
This patches uses GTK+3 API method gtk_render_handle() instead of deprecated gtk_paint_handle() for GTK version 3.0 and higher:

http://fedorapeople.org/cgit/aspektor/public_git/eclipse.platform.swt.git/commit/?h=gtk3_render_handle
Comment 1 Silenio Quarti CLA 2012-10-01 11:19:06 EDT
This patch leaks a cairo context.
Comment 2 Anatoly Spektor CLA 2012-10-01 12:05:06 EDT
(In reply to comment #1)
> This patch leaks a cairo context.

Sorry for that !

Please refer to this revised patch:

http://fedorapeople.org/cgit/aspektor/public_git/eclipse.platform.swt.git/commit/?h=gtk3_render_handle_64
Comment 3 Alexander Kurtakov CLA 2012-10-04 09:09:41 EDT
Silenio, do you have other concerns regarding this patch? It looks good to me and there are a number of others similar. Once I get your OK on this one I'll proceed with committing the rest.
Comment 4 Silenio Quarti CLA 2012-10-04 10:23:03 EDT
The patch is ok to be released, but at some point we need to start using the "draw" signal instead of the "expose-event" so that we do not have to create a cairo graphics for SWT.Paint and for the internal draw methods (drarGripper, drawBackground, etc). The "draw" signal provides a cairo graphics which should be used to draw the gripper instead of creating/disposing a new one.
Comment 5 Alexander Kurtakov CLA 2012-10-04 10:25:34 EDT
I agree 100% and we will start looking into this once we can compile (hopefully run) against gtk3. 
I'll proceed with the commits now.