diff options
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 14 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_apple.c | 14 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_cursors.c | 72 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 42 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 26 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_jobs.c | 48 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_keymap.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 41 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_subwindow.c | 34 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 28 | ||||
-rw-r--r-- | source/blender/windowmanager/wm_event_types.h | 4 |
14 files changed, 173 insertions, 172 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 3a0e5eab143..3beb81eef0a 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -137,13 +137,13 @@ typedef struct wmNotifier { } wmNotifier; -/* 4 levels - -0xFF000000; category -0x00FF0000; data -0x0000FF00; data subtype (unused?) -0x000000FF; action -*/ +/* 4 levels + * + * 0xFF000000; category + * 0x00FF0000; data + * 0x0000FF00; data subtype (unused?) + * 0x000000FF; action + */ /* category */ #define NOTE_CATEGORY 0xFF000000 diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index 3aa974bd9f4..bed49941efd 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -217,10 +217,10 @@ void WM_keymap_init(bContext *C) wm->userconf= WM_keyconfig_new(wm, "Blender User"); /* initialize only after python init is done, for keymaps that - use python operators */ + * use python operators */ if(CTX_py_init_get(C) && (wm->initialized & WM_INIT_KEYMAP) == 0) { /* create default key config, only initialize once, - it's persistent across sessions */ + * it's persistent across sessions */ if(!(wm->defaultconf->flag & KEYCONF_INIT_DEFAULT)) { wm_window_keymap(wm->defaultconf); ED_spacetypes_keymap(wm->defaultconf); diff --git a/source/blender/windowmanager/intern/wm_apple.c b/source/blender/windowmanager/intern/wm_apple.c index e17441873d5..1b2a4e490a4 100644 --- a/source/blender/windowmanager/intern/wm_apple.c +++ b/source/blender/windowmanager/intern/wm_apple.c @@ -40,15 +40,15 @@ #define ID ID_ #include <Carbon/Carbon.h> - /* To avoid killing small end comps, we want to allow -blender to start maximised if all the followings are true : -- Renderer is OpenGL capable -- Hardware acceleration -- VRAM > 16 Mo + * blender to start maximised if all the followings are true : + * - Renderer is OpenGL capable + * - Hardware acceleration + * - VRAM > 16 Mo + * + * We will bail out if VRAM is less than 8Mo + */ - We will bail out if VRAM is less than 8Mo - */ /* bad global, used in wm_window.c to open windows */ int macPrefState = 0; diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index 0770faa8d47..e35a1a269ae 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -273,44 +273,44 @@ void WM_timecursor(wmWindow *win, int nr) } -/* ****************************************************************** -Custom Cursor Description: - -Each bit represents a pixel, so 1 byte = 8 pixels, -the bytes go Left to Right. Top to bottom -the bits in a byte go right to left -(ie; 0x01, 0x80 represents a line of 16 pix with the first and last pix set.) - -A 0 in the bitmap = bg_color, a 1 fg_color -a 0 in the mask = transparent pix. - -Until 32x32 cursors are supported on all platforms, the size of the -small cursors MUST be 16x16. - -Large cursors have a MAXSIZE of 32x32. - -Other than that, the specified size of the cursors is just a guideline, -However, the char array that defines the BM and MASK must be byte aligned. -ie a 17x17 cursor needs 3 bytes (cols) * 17 bytes (rows) -(3 bytes = 17 bits rounded up to nearest whole byte). Pad extra bits -in mask with 0's. - -Setting big_bm=NULL disables the large version of the cursor. - -******************************************************************* - -There is a nice Python GUI utility that can be used for drawing cursors in -this format in the Blender source distribution, in -blender/source/tools/MakeCursor.py . Start it with $ python MakeCursor.py -It will copy its output to the console when you press 'Do it'. - -*/ +/* ****************************************************************** + * Custom Cursor Description: + * + * Each bit represents a pixel, so 1 byte = 8 pixels, + * the bytes go Left to Right. Top to bottom + * the bits in a byte go right to left + * (ie; 0x01, 0x80 represents a line of 16 pix with the first and last pix set.) + * + * A 0 in the bitmap = bg_color, a 1 fg_color + * a 0 in the mask = transparent pix. + * + * Until 32x32 cursors are supported on all platforms, the size of the + * small cursors MUST be 16x16. + * + * Large cursors have a MAXSIZE of 32x32. + * + * Other than that, the specified size of the cursors is just a guideline, + * However, the char array that defines the BM and MASK must be byte aligned. + * ie a 17x17 cursor needs 3 bytes (cols) * 17 bytes (rows) + * (3 bytes = 17 bits rounded up to nearest whole byte). Pad extra bits + * in mask with 0's. + * + * Setting big_bm=NULL disables the large version of the cursor. + * + * ******************************************************************* + * + * There is a nice Python GUI utility that can be used for drawing cursors in + * this format in the Blender source distribution, in + * blender/source/tools/MakeCursor.py . Start it with $ python MakeCursor.py + * It will copy its output to the console when you press 'Do it'. + * + */ /* Because defining a cursor mixes declarations and executable code -each cursor needs it's own scoping block or it would be split up -over several hundred lines of code. To enforce/document this better -I define 2 pretty braindead macros so it's obvious what the extra "[]" -are for */ + * each cursor needs it's own scoping block or it would be split up + * over several hundred lines of code. To enforce/document this better + * I define 2 pretty braindead macros so it's obvious what the extra "[]" + * are for */ #define BEGIN_CURSOR_BLOCK { #define END_CURSOR_BLOCK } diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index d386f65498f..4751dbb87ff 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -701,9 +701,9 @@ static int wm_draw_update_test_window(wmWindow *win) static int wm_automatic_draw_method(wmWindow *win) { /* Ideally all cards would work well with triple buffer, since if it works - well gives the least redraws and is considerably faster at partial redraw - for sculpting or drawing overlapping menus. For typically lower end cards - copy to texture is slow though and so we use overlap instead there. */ + * well gives the least redraws and is considerably faster at partial redraw + * for sculpting or drawing overlapping menus. For typically lower end cards + * copy to texture is slow though and so we use overlap instead there. */ if(win->drawmethod == USER_DRAW_AUTOMATIC) { /* ATI opensource driver is known to be very slow at this */ diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 591b8b1103b..e15ed7b8929 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -537,8 +537,8 @@ static void wm_operator_finished(bContext *C, wmOperator *op, int repeat) op->customdata= NULL; /* we don't want to do undo pushes for operators that are being - called from operators that already do an undo push. usually - this will happen for python operators that call C operators */ + * called from operators that already do an undo push. usually + * this will happen for python operators that call C operators */ if(wm->op_undo_depth == 0) if(op->type->flag & OPTYPE_UNDO) ED_undo_push_op(C, op); @@ -889,9 +889,9 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P } /* cancel UI handlers, typically tooltips that can hang around - while dragging the view or worse, that stay there permanently - after the modal operator has swallowed all events and passed - none to the UI handler */ + * while dragging the view or worse, that stay there permanently + * after the modal operator has swallowed all events and passed + * none to the UI handler */ wm_handler_ui_cancel(C); } else @@ -1027,10 +1027,10 @@ int WM_operator_name_call(bContext *C, const char *opstring, int context, Pointe } /* Similar to WM_operator_name_call called with WM_OP_EXEC_DEFAULT context. - - wmOperatorType is used instead of operator name since python already has the operator type - - poll() must be called by python before this runs. - - reports can be passed to this function (so python can report them as exceptions) -*/ + * - wmOperatorType is used instead of operator name since python already has the operator type + * - poll() must be called by python before this runs. + * - reports can be passed to this function (so python can report them as exceptions) + */ int WM_operator_call_py(bContext *C, wmOperatorType *ot, int context, PointerRNA *properties, ReportList *reports) { int retval= OPERATOR_CANCELLED; @@ -1090,7 +1090,7 @@ static void wm_handler_op_context(bContext *C, wmEventHandler *handler) break; if(sa==NULL) { /* when changing screen layouts with running modal handlers (like render display), this - is not an error to print */ + * is not an error to print */ if(handler->op==NULL) printf("internal error: handler (%s) has invalid area\n", handler->op->type->idname); } @@ -2028,7 +2028,7 @@ void wm_event_do_handlers(bContext *C) } /* XXX hrmf, this gives reliable previous mouse coord for area change, feels bad? - doing it on ghost queue gives errors when mousemoves go over area borders */ + * doing it on ghost queue gives errors when mousemoves go over area borders */ if(doit && win->screen && win->screen->subwinactive != win->screen->mainwin) { win->eventstate->prevx= event->x; win->eventstate->prevy= event->y; @@ -2116,9 +2116,9 @@ void WM_event_fileselect_event(bContext *C, void *ophandle, int eventval) /* optional property: filetype (XXX enum?) */ /* Idea is to keep a handler alive on window queue, owning the operator. - The filewindow can send event to make it execute, thus ensuring - executing happens outside of lower level queues, with UI refreshed. - Should also allow multiwin solutions */ + * The filewindow can send event to make it execute, thus ensuring + * executing happens outside of lower level queues, with UI refreshed. + * Should also allow multiwin solutions */ void WM_event_add_fileselect(bContext *C, wmOperator *op) { @@ -2582,8 +2582,8 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U event.type= MOUSEMOVE; /* some painting operators want accurate mouse events, they can - handle in between mouse move moves, others can happily ignore - them for better performance */ + * handle in between mouse move moves, others can happily ignore + * them for better performance */ if(lastevent && lastevent->type == MOUSEMOVE) lastevent->type = INBETWEEN_MOUSEMOVE; @@ -2754,14 +2754,14 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U } /* this case happens on some systems that on holding a key pressed, - generate press events without release, we still want to keep the - modifier in win->eventstate, but for the press event of the same - key we don't want the key modifier */ + * generate press events without release, we still want to keep the + * modifier in win->eventstate, but for the press event of the same + * key we don't want the key modifier */ if(event.keymodifier == event.type) event.keymodifier= 0; /* this case happened with an external numpad, it's not really clear - why, but it's also impossible to map a key modifier to an unknwon - key, so it shouldn't harm */ + * why, but it's also impossible to map a key modifier to an unknwon + * key, so it shouldn't harm */ if(event.keymodifier == UNKNOWNKEY) event.keymodifier= 0; diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index f50049f93b7..0c2cb7dab3e 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -120,12 +120,12 @@ static void write_history(void); -/* To be able to read files without windows closing, opening, moving - we try to prepare for worst case: - - active window gets active screen from file - - restoring the screens from non-active windows - Best case is all screens match, in that case they get assigned to proper window -*/ +/* To be able to read files without windows closing, opening, moving + * we try to prepare for worst case: + * - active window gets active screen from file + * - restoring the screens from non-active windows + * Best case is all screens match, in that case they get assigned to proper window + */ static void wm_window_match_init(bContext *C, ListBase *wmlist) { wmWindowManager *wm; @@ -173,11 +173,11 @@ static void wm_window_match_init(bContext *C, ListBase *wmlist) } /* match old WM with new, 4 cases: - 1- no current wm, no read wm: make new default - 2- no current wm, but read wm: that's OK, do nothing - 3- current wm, but not in file: try match screen names - 4- current wm, and wm in file: try match ghostwin -*/ + * 1- no current wm, no read wm: make new default + * 2- no current wm, but read wm: that's OK, do nothing + * 3- current wm, but not in file: try match screen names + * 4- current wm, and wm in file: try match ghostwin + */ static void wm_window_match_do(bContext *C, ListBase *oldwmlist) { @@ -332,13 +332,13 @@ static int wm_read_exotic(Scene *UNUSED(scene), const char *name) } else { //XXX waitcursor(1); - /* +#if 0 /* historic stuff - no longer used */ if(is_foo_format(name)) { read_foo(name); retval= BKE_READ_EXOTIC_OK_OTHER; } else - */ +#endif { retval= BKE_READ_EXOTIC_FAIL_FORMAT; } diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index b9bc6d04654..f5dec4dbcd3 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -162,7 +162,7 @@ void WM_init(bContext *C, int argc, const char **argv) BPY_driver_reset(); BPY_app_handlers_reset(FALSE); /* causes addon callbacks to be freed [#28068], - * but this is actually what we want. */ + * but this is actually what we want. */ BPY_modules_load_user(C); #else (void)argc; /* unused */ @@ -192,10 +192,10 @@ void WM_init(bContext *C, int argc, const char **argv) WM_read_history(); /* allow a path of "", this is what happens when making a new file */ - /* +#if 0 if(G.main->name[0] == 0) BLI_make_file_string("/", G.main->name, BLI_getDefaultDocumentFolder(), "untitled.blend"); - */ +#endif BLI_strncpy(G.lib, G.main->name, FILE_MAX); } diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index f2ee5a328d6..5e09a701755 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -58,29 +58,29 @@ /* ********************** Threaded Jobs Manager ****************************** */ /* -Add new job -- register in WM -- configure callbacks - -Start or re-run job -- if job running - - signal job to end - - add timer notifier to verify when it has ended, to start it -- else - - start job - - add timer notifier to handle progress - -Stop job - - signal job to end - on end, job will tag itself as sleeping - -Remove job -- signal job to end - on end, job will remove itself - -When job is done: -- it puts timer to sleep (or removes?) - + * Add new job + * - register in WM + * - configure callbacks + * + * Start or re-run job + * - if job running + * - signal job to end + * - add timer notifier to verify when it has ended, to start it + * - else + * - start job + * - add timer notifier to handle progress + * + * Stop job + * - signal job to end + * on end, job will tag itself as sleeping + * + * Remove job + * - signal job to end + * on end, job will remove itself + * + * When job is done: + * - it puts timer to sleep (or removes?) + * */ struct wmJob { @@ -150,7 +150,7 @@ static wmJob *wm_job_find(wmWindowManager *wm, void *owner, const char *name) /* returns current or adds new job, but doesnt run it */ /* every owner only gets a single job, adding a new one will stop running stop and - when stopped it starts the new one */ + * when stopped it starts the new one */ wmJob *WM_jobs_get(wmWindowManager *wm, wmWindow *win, void *owner, const char *name, int flag) { wmJob *steve= wm_job_find(wm, owner, name); diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index d34a7d46e54..107ebd8699c 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -240,7 +240,7 @@ static wmKeyConfig *WM_keyconfig_active(wmWindowManager *wm) void WM_keyconfig_set_active(wmWindowManager *wm, const char *idname) { /* setting a different key configuration as active: we ensure all is - updated properly before and after making the change */ + * updated properly before and after making the change */ WM_keyconfig_update(wm); @@ -534,7 +534,7 @@ static wmKeyMap *wm_keymap_patch_update(ListBase *lb, wmKeyMap *defaultmap, wmKe /* copy new keymap from an existing one */ if(usermap && !(usermap->flag & KEYMAP_DIFF)) { /* for compatibiltiy with old user preferences with non-diff - keymaps we override the original entirely */ + * keymaps we override the original entirely */ wmKeyMapItem *kmi, *orig_kmi; km = wm_keymap_copy(usermap); @@ -620,7 +620,7 @@ static void wm_keymap_diff_update(ListBase *lb, wmKeyMap *defaultmap, wmKeyMap * /* ****************** storage in WM ************ */ /* name id's are for storing general or multiple keymaps, - space/region ids are same as DNA_space_types.h */ + * space/region ids are same as DNA_space_types.h */ /* gets freed in wm.c */ wmKeyMap *WM_keymap_list_find(ListBase *lb, const char *idname, int spaceid, int regionid) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index cab4b014c3e..22e6d5be383 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -461,7 +461,7 @@ void WM_operator_py_idname(char *to, const char *from) int ofs= (sep-from); /* note, we use ascii tolower instead of system tolower, because the - latter depends on the locale, and can lead to idname mistmatch */ + * latter depends on the locale, and can lead to idname mistmatch */ memcpy(to, from, sizeof(char)*ofs); BLI_ascii_strtolower(to, ofs); @@ -1228,10 +1228,11 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse static void wm_block_splash_refreshmenu (bContext *UNUSED(C), void *UNUSED(arg_block), void *UNUSED(arg)) { /* ugh, causes crashes in other buttons, disabling for now until - * a better fix + * a better fix */ +#if 0 uiPupBlockClose(C, arg_block); uiPupBlock(C, wm_block_create_splash, NULL); - */ +#endif } static int wm_resource_check_prev(void) @@ -1672,9 +1673,9 @@ int wm_link_append_poll(bContext *C) { if(WM_operator_winactive(C)) { /* linking changes active object which is pretty useful in general, - but which totally confuses edit mode (i.e. it becoming not so obvious - to leave from edit mode and inwalid tools in toolbar might be displayed) - so disable link/append when in edit mode (sergey) */ + * but which totally confuses edit mode (i.e. it becoming not so obvious + * to leave from edit mode and inwalid tools in toolbar might be displayed) + * so disable link/append when in edit mode (sergey) */ if(CTX_data_edit_object(C)) return 0; @@ -2272,10 +2273,10 @@ static void WM_OT_console_toggle(wmOperatorType *ot) /* ************ default paint cursors, draw always around cursor *********** */ /* - - returns handler to free - - poll(bContext): returns 1 if draw should happen - - draw(bContext): drawing callback for paint cursor -*/ + * - returns handler to free + * - poll(bContext): returns 1 if draw should happen + * - draw(bContext): drawing callback for paint cursor + */ void *WM_paint_cursor_activate(wmWindowManager *wm, int (*poll)(bContext *C), wmPaintCursorDraw draw, void *customdata) @@ -2312,11 +2313,11 @@ void WM_paint_cursor_end(wmWindowManager *wm, void *handle) /* **************** Border gesture *************** */ /* Border gesture has two types: - 1) WM_GESTURE_CROSS_RECT: starts a cross, on mouse click it changes to border - 2) WM_GESTURE_RECT: starts immediate as a border, on mouse click or release it ends - - It stores 4 values (xmin, xmax, ymin, ymax) and event it ended with (event_type) -*/ + * 1) WM_GESTURE_CROSS_RECT: starts a cross, on mouse click it changes to border + * 2) WM_GESTURE_RECT: starts immediate as a border, on mouse click or release it ends + * + * It stores 4 values (xmin, xmax, ymin, ymax) and event it ended with (event_type) + */ static int border_apply_rect(wmOperator *op) { @@ -2726,7 +2727,7 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event) y = (event->y - sy - lasso[1]); /* make a simple distance check to get a smoother lasso - add only when at least 2 pixels between this and previous location */ + * add only when at least 2 pixels between this and previous location */ if((x*x+y*y) > 4) { lasso += 2; lasso[0] = event->x - sx; @@ -3112,8 +3113,8 @@ typedef enum { } RCPropFlags; /* attempt to retrieve the rna pointer/property from an rna path; - returns 0 for failure, 1 for success, and also 1 if property is not - set */ + * returns 0 for failure, 1 for success, and also 1 if property is not + * set */ static int radial_control_get_path(PointerRNA *ctx_ptr, wmOperator *op, const char *name, PointerRNA *r_ptr, PropertyRNA **r_prop, int req_length, RCPropFlags flags) @@ -3326,8 +3327,8 @@ static int radial_control_cancel(bContext *C, wmOperator *op) wm->paintcursors = rc->orig_paintcursors; /* not sure if this is a good notifier to use; - intended purpose is to update the UI so that the - new value is displayed in sliders/numfields */ + * intended purpose is to update the UI so that the + * new value is displayed in sliders/numfields */ WM_event_add_notifier(C, NC_WINDOW, NULL); glDeleteTextures(1, &rc->gltex); diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c index 8a4dd3df134..5e11e31c045 100644 --- a/source/blender/windowmanager/intern/wm_subwindow.c +++ b/source/blender/windowmanager/intern/wm_subwindow.c @@ -58,14 +58,14 @@ /* wmSubWindow stored in wmWindow... but not exposed outside this C file */ /* it seems a bit redundant (area regions can store it too, but we keep it - because we can store all kind of future opengl fanciness here */ + * because we can store all kind of future opengl fanciness here */ /* we use indices and array because: - - index has safety, no pointers from this C file hanging around - - fast lookups of indices with array, list would give overhead - - old code used it this way... - - keep option open to have 2 screens using same window -*/ + * - index has safety, no pointers from this C file hanging around + * - fast lookups of indices with array, list would give overhead + * - old code used it this way... + * - keep option open to have 2 screens using same window + */ typedef struct wmSubWindow { struct wmSubWindow *next, *prev; @@ -207,17 +207,17 @@ void wm_subwindow_position(wmWindow *win, int swinid, rcti *winrct) swin->winrct= *winrct; /* CRITICAL, this clamping ensures that - * the viewport never goes outside the screen - * edges (assuming the x, y coords aren't - * outside). This caused a hardware lock - * on Matrox cards if it happens. - * - * Really Blender should never _ever_ try - * to do such a thing, but just to be safe - * clamp it anyway (or fix the bScreen - * scaling routine, and be damn sure you - * fixed it). - zr (2001!) - */ + * the viewport never goes outside the screen + * edges (assuming the x, y coords aren't + * outside). This caused a hardware lock + * on Matrox cards if it happens. + * + * Really Blender should never _ever_ try + * to do such a thing, but just to be safe + * clamp it anyway (or fix the bScreen + * scaling routine, and be damn sure you + * fixed it). - zr (2001!) + */ if (swin->winrct.xmax > win->sizex) swin->winrct.xmax= win->sizex; diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 6842b6be497..2e3e56f7c23 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -85,7 +85,7 @@ static unsigned short useprefsize= 0; /* ******** win open & close ************ */ /* XXX this one should correctly check for apple top header... - done for Cocoa : returns window contents (and not frame) max size*/ + * done for Cocoa : returns window contents (and not frame) max size*/ void wm_get_screensize(int *width_r, int *height_r) { unsigned int uiwidth; @@ -141,7 +141,7 @@ static void wm_ghostwindow_destroy(wmWindow *win) } /* including window itself, C can be NULL. - ED_screen_exit should have been called */ + * ED_screen_exit should have been called */ void wm_window_free(bContext *C, wmWindowManager *wm, wmWindow *win) { wmTimer *wt, *wtnext; @@ -290,8 +290,8 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win) GHOST_SetTitle(win->ghostwin, "Blender"); /* Informs GHOST of unsaved changes, to set window modified visual indicator (MAC OS X) - and to give hint of unsaved changes for a user warning mechanism - in case of OS application terminate request (e.g. OS Shortcut Alt+F4, Cmd+Q, (...), or session end) */ + * and to give hint of unsaved changes for a user warning mechanism + * in case of OS application terminate request (e.g. OS Shortcut Alt+F4, Cmd+Q, (...), or session end) */ GHOST_SetWindowModifiedState(win->ghostwin, (GHOST_TUns8)!wm->file_saved); #if defined(__APPLE__) && !defined(GHOST_COCOA) @@ -326,7 +326,7 @@ static void wm_window_add_ghostwindow(bContext *C, const char *title, wmWindow * } #endif /* Disable AA for now, as GL_SELECT (used for border, lasso, ... select) - doesn't work well when AA is initialized, even if not used. */ + * doesn't work well when AA is initialized, even if not used. */ ghostwin= GHOST_CreateWindow(g_system, title, win->posx, posy, win->sizex, win->sizey, initial_state, @@ -450,7 +450,7 @@ wmWindow *WM_window_open(bContext *C, rcti *rect) } /* uses screen->temp tag to define what to do, currently it limits - to only one "temp" window for render out, preferences, filewindow, etc */ + * to only one "temp" window for render out, preferences, filewindow, etc */ /* type is #define in WM_api.h */ void WM_window_open_temp(bContext *C, rcti *position, int type) @@ -777,7 +777,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) if (path) { /* operator needs a valid window in context, ensures - it is correctly set */ + * it is correctly set */ oldWindow = CTX_wm_window(C); CTX_wm_window_set(C, win); @@ -860,11 +860,11 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) /* This timer system only gives maximum 1 timer event per redraw cycle, - to prevent queues to get overloaded. - Timer handlers should check for delta to decide if they just - update, or follow real time. - Timer handlers can also set duration to match frames passed -*/ + * to prevent queues to get overloaded. + * Timer handlers should check for delta to decide if they just + * update, or follow real time. + * Timer handlers can also set duration to match frames passed + */ static int wm_window_timer(const bContext *C) { wmWindowManager *wm= CTX_wm_manager(C); @@ -931,8 +931,8 @@ void wm_window_testbreak(void) double curtime= PIL_check_seconds_timer(); /* only check for breaks every 50 milliseconds - * if we get called more often. - */ + * if we get called more often. + */ if ((curtime-ltime)>.05) { int hasevent= GHOST_ProcessEvents(g_system, 0); /* 0 is no wait */ diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index 02434d85c51..30f6c564688 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -78,8 +78,8 @@ /* NDOF (from SpaceNavigator & friends) - These should be kept in sync with GHOST_NDOFManager.h - Ordering matters, exact values do not. */ + * These should be kept in sync with GHOST_NDOFManager.h + * Ordering matters, exact values do not. */ #define NDOF_MOTION 400 |