diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-01-12 06:02:53 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-01-12 06:02:53 +0400 |
commit | 94ae0232b0337ab70cecaef03cd845887cd36eaa (patch) | |
tree | caea2819c7fe0400fb91c9bdf0e99a9e0fd50cf6 /source/blender/windowmanager | |
parent | 9a109c22ae1ef8a5c75932d661610b23ec685bd7 (diff) | |
parent | f68e9db583489d541d535791536ea20bc1ae1d76 (diff) |
Merged changes in the trunk up to revision 53729.
Conflicts resolved:
release/datafiles/startup.blend
source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 13 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 10 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 8 |
5 files changed, 31 insertions, 10 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index eee4b5a3a57..eb1aad75a88 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -204,9 +204,9 @@ void WM_operator_stack_clear(struct wmWindowManager *wm); struct wmOperatorType *WM_operatortype_find(const char *idnamem, int quiet); struct GHashIterator *WM_operatortype_iter(void); -void WM_operatortype_append (void (*opfunc)(struct wmOperatorType*)); -void WM_operatortype_append_ptr (void (*opfunc)(struct wmOperatorType*, void *), void *userdata); -void WM_operatortype_append_macro_ptr (void (*opfunc)(struct wmOperatorType*, void *), void *userdata); +void WM_operatortype_append(void (*opfunc)(struct wmOperatorType *)); +void WM_operatortype_append_ptr(void (*opfunc)(struct wmOperatorType *, void *), void *userdata); +void WM_operatortype_append_macro_ptr(void (*opfunc)(struct wmOperatorType *, void *), void *userdata); int WM_operatortype_remove(const char *idname); struct wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index a6b3efd30bf..48cad9e020b 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1345,6 +1345,15 @@ static void wm_event_modalkeymap(const bContext *C, wmOperator *op, wmEvent *eve } } } + else { + /* modal keymap checking returns handled events fine, but all hardcoded modal + handling typically swallows all events (OPERATOR_RUNNING_MODAL). + This bypass just disables support for double clicks in hardcoded modal handlers */ + if (event->val == KM_DBL_CLICK) { + event->prevval = event->val; + event->val = KM_PRESS; + } + } } /* bad hacking event system... better restore event type for checking of KM_CLICK for example */ @@ -1357,6 +1366,8 @@ static void wm_event_modalmap_end(wmEvent *event) event->val = event->prevval; event->prevval = 0; } + else if (event->prevval == KM_DBL_CLICK) + event->val = KM_DBL_CLICK; } @@ -2792,6 +2803,8 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U switch (pd->subtype) { case GHOST_kTrackpadEventMagnify: event.type = MOUSEZOOM; + pd->deltaX = -pd->deltaX; + pd->deltaY = -pd->deltaY; break; case GHOST_kTrackpadEventRotate: event.type = MOUSEROTATE; diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 61699c94567..550a9f83cff 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -740,11 +740,11 @@ static ImBuf *blend_file_thumb(Scene *scene, bScreen *screen, int **thumb_pt) if (scene->camera) { ibuf = ED_view3d_draw_offscreen_imbuf_simple(scene, scene->camera, BLEN_THUMB_SIZE * 2, BLEN_THUMB_SIZE * 2, - IB_rect, OB_SOLID, FALSE, FALSE, FALSE, err_out); + IB_rect, OB_SOLID, FALSE, FALSE, R_ADDSKY, err_out); } else { ibuf = ED_view3d_draw_offscreen_imbuf(scene, v3d, ar, BLEN_THUMB_SIZE * 2, BLEN_THUMB_SIZE * 2, - IB_rect, FALSE, FALSE, err_out); + IB_rect, FALSE, R_ADDSKY, err_out); } if (ibuf) { diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index bfcd4b1e955..b2c3c935553 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -151,7 +151,7 @@ void WM_operatortype_append(void (*opfunc)(wmOperatorType *)) wmOperatorType *ot; ot = MEM_callocN(sizeof(wmOperatorType), "operatortype"); - ot->srna = RNA_def_struct(&BLENDER_RNA, "", "OperatorProperties"); + ot->srna = RNA_def_struct_ptr(&BLENDER_RNA, "", &RNA_OperatorProperties); /* Set the default i18n context now, so that opfunc can redefine it if needed! */ RNA_def_struct_translation_context(ot->srna, BLF_I18NCONTEXT_OPERATOR_DEFAULT); opfunc(ot); @@ -173,7 +173,7 @@ void WM_operatortype_append_ptr(void (*opfunc)(wmOperatorType *, void *), void * wmOperatorType *ot; ot = MEM_callocN(sizeof(wmOperatorType), "operatortype"); - ot->srna = RNA_def_struct(&BLENDER_RNA, "", "OperatorProperties"); + ot->srna = RNA_def_struct_ptr(&BLENDER_RNA, "", &RNA_OperatorProperties); /* Set the default i18n context now, so that opfunc can redefine it if needed! */ RNA_def_struct_translation_context(ot->srna, BLF_I18NCONTEXT_OPERATOR_DEFAULT); opfunc(ot, userdata); @@ -360,7 +360,7 @@ wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *nam } ot = MEM_callocN(sizeof(wmOperatorType), "operatortype"); - ot->srna = RNA_def_struct(&BLENDER_RNA, "", "OperatorProperties"); + ot->srna = RNA_def_struct_ptr(&BLENDER_RNA, "", &RNA_OperatorProperties); ot->idname = idname; ot->name = name; @@ -390,7 +390,7 @@ void WM_operatortype_append_macro_ptr(void (*opfunc)(wmOperatorType *, void *), wmOperatorType *ot; ot = MEM_callocN(sizeof(wmOperatorType), "operatortype"); - ot->srna = RNA_def_struct(&BLENDER_RNA, "", "OperatorProperties"); + ot->srna = RNA_def_struct_ptr(&BLENDER_RNA, "", &RNA_OperatorProperties); ot->flag = OPTYPE_MACRO; ot->exec = wm_macro_exec; @@ -1558,7 +1558,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_NO_WIN_CLIP); /* XXX splash scales with pixelsize, should become widget-units */ - but = uiDefBut(block, BUT_IMAGE, 0, "", 0, 0.5f * U.widget_unit, U.pixelsize * 501, U.pixelsize *282, ibuf, 0.0, 0.0, 0, 0, ""); /* button owns the imbuf now */ + but = uiDefBut(block, BUT_IMAGE, 0, "", 0, 0.5f * U.widget_unit, U.pixelsize * 501, U.pixelsize * 282, ibuf, 0.0, 0.0, 0, 0, ""); /* button owns the imbuf now */ uiButSetFunc(but, wm_block_splash_close, block, NULL); uiBlockSetFunc(block, wm_block_splash_refreshmenu, block, NULL); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index ec94501c8be..9e0f8613a1a 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -701,6 +701,14 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr case GHOST_kEventWindowDeactivate: wm_event_add_ghostevent(wm, win, type, time, data); win->active = 0; /* XXX */ + + /* clear modifiers for inactive windows */ + win->eventstate->alt = 0; + win->eventstate->ctrl = 0; + win->eventstate->shift = 0; + win->eventstate->oskey = 0; + win->eventstate->keymodifier = 0; + break; case GHOST_kEventWindowActivate: { |