~ubuntu-branches/ubuntu/oneiric/cairo-dock/oneiric-201106091216

« back to all changes in this revision

Viewing changes to src/cairo-dock-container.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe), Matthieu Baerts (matttbe), Didier Roche
  • Date: 2010-03-01 21:24:00 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100301212400-3a3csog6eonse3in
Tags: 2.1.3-6-0ubuntu1
[ Matthieu Baerts (matttbe) ]
* New Upstream Version. (LP: #521534)
* Updated debian/watch and debian/copyright with LP account.
* Removed debian/patches/02-merge-changelog.patch'
 - data/ChangeLog.txt has to respect a syntax and is used by CD.
* debian/cairo-dock.1:
 - Updated with the latest release.
 - The domain name 'cairo-dock.org' has changed to 'glx-dock.org'
* debian/control:
 - Changed the homepage and other links (glx-dock.org)
 - Updated cairo-dock-dev architecture to 'all' (it no longer contains compiled files)
* debian/cairo-dock-dev.install
 - libcairo-dock.a and libcairo-dock.so no longer exist
* debian/rules
 - removed uneeded changelog file
* Updated debian/patches/01-desktop-file-category.patch

[ Didier Roche ]
* Fix debian/watch
* Fix some issue in versionning
* debian/control: clean the packaging and add right -plugins depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include "cairo-dock-dock-facility.h"
43
43
#include "cairo-dock-dock-manager.h"
44
44
#include "cairo-dock-log.h"
 
45
#include "cairo-dock-opengl.h"
45
46
#include "cairo-dock-notifications.h"
46
47
#include "cairo-dock-container.h"
47
48
 
51
52
 
52
53
extern gboolean g_bUseGlitz;
53
54
extern gboolean g_bUseOpenGL;
54
 
extern gboolean g_bIndirectRendering;
55
 
extern GdkGLConfig* g_pGlConfig;
56
 
 
57
 
 
58
 
static void _cairo_dock_on_realize (GtkWidget* pWidget, gpointer data)
59
 
{
60
 
        if (! g_bUseOpenGL)
61
 
                return ;
62
 
        
63
 
        GdkGLContext* pGlContext = gtk_widget_get_gl_context (pWidget);
64
 
        GdkGLDrawable* pGlDrawable = gtk_widget_get_gl_drawable (pWidget);
65
 
        if (!gdk_gl_drawable_gl_begin (pGlDrawable, pGlContext))
66
 
                return ;
67
 
        
68
 
        glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
69
 
        glClearDepth (1.0f);
70
 
        glClearStencil (0);
71
 
        glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
72
 
        
73
 
        glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);  // GL_MODULATE / GL_DECAL /  GL_BLEND
74
 
        
75
 
        glTexParameteri (GL_TEXTURE_2D,
76
 
                GL_TEXTURE_MIN_FILTER,
77
 
                GL_LINEAR_MIPMAP_LINEAR);
78
 
        glTexParameteri (GL_TEXTURE_2D,
79
 
                GL_TEXTURE_MAG_FILTER,
80
 
                GL_LINEAR);
81
 
        
82
 
        gdk_gl_drawable_gl_end (pGlDrawable);
83
 
}
 
55
 
84
56
 
85
57
static gboolean _cairo_dock_on_delete (GtkWidget *pWidget, GdkEvent *event, gpointer data)
86
58
{
 
59
        g_print ("pas de alt+f4\n");
87
60
        return TRUE;  // on empeche les ALT+F4 malheureux.
88
61
}
89
62
 
99
72
        cairo_dock_set_colormap_for_window (pWindow);
100
73
        if (g_bUseOpenGL && bOpenGLWindow)
101
74
        {
102
 
                GdkGLContext *pMainGlContext = gtk_widget_get_gl_context (g_pMainDock ? g_pMainDock->container.pWidget : NULL);  // NULL si on est en train de creer la fenetre du main dock, ce qui nous convient.
103
 
                gtk_widget_set_gl_capability (pWindow,
104
 
                        g_pGlConfig,
105
 
                        pMainGlContext,  // on partage les ressources entre les contextes.
106
 
                        ! g_bIndirectRendering,  // TRUE <=> direct connection to the graphics system.
107
 
                        GDK_GL_RGBA_TYPE);
108
 
                g_signal_connect_after (G_OBJECT (pWindow),
109
 
                        "realize",
110
 
                        G_CALLBACK (_cairo_dock_on_realize),
111
 
                        NULL);
 
75
                cairo_dock_set_gl_capabilities (pWindow);
112
76
        }
113
77
        
114
78
        g_signal_connect (G_OBJECT (pWindow),
222
186
        g_return_if_fail (pContainer != NULL);
223
187
        if (! GTK_WIDGET_VISIBLE (pContainer->pWidget))
224
188
                return ;
225
 
        if (CAIRO_DOCK_IS_DOCK (pContainer) && CAIRO_DOCK (pContainer)->bAtBottom && (/**CAIRO_DOCK (pContainer)->iRefCount > 0 || */CAIRO_DOCK (pContainer)->bAutoHide))  // inutile de redessiner.
 
189
        if (CAIRO_DOCK_IS_DOCK (pContainer) && cairo_dock_is_hidden (CAIRO_DOCK (pContainer)))  // inutile de redessiner.
226
190
                return ;
227
191
        if (pArea->y < 0)
228
192
                pArea->y = 0;