Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Wed, 21 Mar 2018 15:27:48 +0000 (16:27 +0100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 21 Mar 2018 15:27:48 +0000 (16:27 +0100)
1  2 
intern/ghost/GHOST_C-api.h
intern/ghost/GHOST_ISystem.h
intern/ghost/intern/GHOST_C-api.cpp
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_SystemX11.h
release/scripts/startup/bl_ui/space_userpref.py
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_window.c
source/blender/windowmanager/wm_window.h

Simple merge
Simple merge
Simple merge
index 0de6e2f7d4ac638acefc4437e17f37db6d905e37,7fde6791d78b3f7a94208f6d33e825964608f264..69aa3a09977ca7ff456a1a25986716592ecd8527
@@@ -386,98 -379,11 +386,102 @@@ createWindow(const STR_String& title
        return window;
  }
  
+ bool GHOST_SystemX11::supportsNativeDialogs(void) 
+ {
+       return false;
+ }
  
 +/**
 + * Create a new offscreen context.
 + * Never explicitly delete the context, use disposeContext() instead.
 + * \return  The new context (or 0 if creation failed).
 + */
 +GHOST_IContext *
 +GHOST_SystemX11::
 +createOffscreenContext()
 +{
 +      // During development:
 +      //   try 4.x compatibility profile
 +      //   try 3.3 compatibility profile
 +      //   fall back to 3.0 if needed
 +      //
 +      // Final Blender 2.8:
 +      //   try 4.x core profile
 +      //   try 3.3 core profile
 +      //   no fallbacks
 +
 +#if defined(WITH_GL_PROFILE_CORE)
 +      {
 +              const char *version_major = (char*)glewGetString(GLEW_VERSION_MAJOR);
 +              if (version_major != NULL && version_major[0] == '1') {
 +                      fprintf(stderr, "Error: GLEW version 2.0 and above is required.\n");
 +                      abort();
 +              }
 +      }
 +#endif
 +
 +      const int profile_mask =
 +#if defined(WITH_GL_PROFILE_CORE)
 +              GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
 +#elif defined(WITH_GL_PROFILE_COMPAT)
 +              GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
 +#else
 +#  error // must specify either core or compat at build time
 +#endif
 +
 +      GHOST_Context *context;
 +
 +      for (int minor = 5; minor >= 0; --minor) {
 +              context = new GHOST_ContextGLX(
 +                      false,
 +                      0,
 +                      (Window)NULL,
 +                      m_display,
 +                      (GLXFBConfig)NULL,
 +                      profile_mask,
 +                      4, minor,
 +                      GHOST_OPENGL_GLX_CONTEXT_FLAGS | (false ? GLX_CONTEXT_DEBUG_BIT_ARB : 0),
 +                      GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY);
 +
 +              if (context->initializeDrawingContext())
 +                      return context;
 +              else
 +                      delete context;
 +      }
 +
 +      context = new GHOST_ContextGLX(
 +              false,
 +              0,
 +              (Window)NULL,
 +              m_display,
 +              (GLXFBConfig)NULL,
 +              profile_mask,
 +              3, 3,
 +              GHOST_OPENGL_GLX_CONTEXT_FLAGS | (false ? GLX_CONTEXT_DEBUG_BIT_ARB : 0),
 +              GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY);
 +
 +      if (context->initializeDrawingContext())
 +              return context;
 +      else
 +              delete context;
 +
 +      return NULL;
 +}
 +
 +/**
 + * Dispose of a context.
 + * \param   context Pointer to the context to be disposed.
 + * \return  Indication of success.
 + */
 +GHOST_TSuccess
 +GHOST_SystemX11::
 +disposeContext(GHOST_IContext *context)
 +{
 +      delete context;
 +
 +      return GHOST_kSuccess;
 +}
 +
  #if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
  static void destroyIMCallback(XIM /*xim*/, XPointer ptr, XPointer /*data*/)
  {
Simple merge
index 652cefb1a54ab7db96837d550e1a0403130413bb,4313c978ef4c9c916e0f313ad44ce35fe7c85bf1..75595eb8817342f02c832c4b646318dcb945bce9
@@@ -81,13 -76,10 +81,14 @@@ void               wm_window_IME_end       (wmWindow *win)
  
  /* *************** window operators ************** */
  int                   wm_window_close_exec(bContext *C, struct wmOperator *op);
 -int                   wm_window_duplicate_exec(bContext *C, struct wmOperator *op);
  int                   wm_window_fullscreen_toggle_exec(bContext *C, struct wmOperator *op);
+ void          wm_confirm_quit(bContext *C);
  
 +const struct EnumPropertyItem *wm_window_new_screen_itemf(
 +        bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
 +int                   wm_window_new_exec(bContext *C, struct wmOperator *op);
 +int                   wm_window_new_invoke(bContext *C, struct wmOperator *op, const struct wmEvent *event);
 +
  /* Initial (unmaximized) size to start with for
   * systems that can't find it for themselves (X11).
   * Clamped by real desktop limits */