Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 5cf2f8932f5..9b1695be67a 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -271,9 +271,11 @@ void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
void wm_window_title(wmWindowManager *wm, wmWindow *win)
{
- /* handle the 'temp' window */
+ /* handle the 'temp' window, only set title when not set before */
if(win->screen && win->screen->temp) {
- GHOST_SetTitle(win->ghostwin, "Blender");
+ char *title= GHOST_GetTitle(win->ghostwin);
+ if(title==NULL || title[0]==0)
+ GHOST_SetTitle(win->ghostwin, "Blender");
}
else {
@@ -671,13 +673,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
GHOST_ScreenToClient(win->ghostwin, wx, wy, &cx, &cy);
win->eventstate->x= cx;
-
-#if defined(__APPLE__) && defined(GHOST_COCOA)
- //Cocoa already uses coordinates with y=0 at bottom
- win->eventstate->y= cy;
-#else
win->eventstate->y= (win->sizey-1) - cy;
-#endif
win->addmousemove= 1; /* enables highlighted buttons */
@@ -794,20 +790,13 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
wmEvent event;
GHOST_TEventDragnDropData *ddd= GHOST_GetEventData(evt);
int cx, cy, wx, wy;
-
/* entering window, update mouse pos */
GHOST_GetCursorPosition(g_system, &wx, &wy);
GHOST_ScreenToClient(win->ghostwin, wx, wy, &cx, &cy);
win->eventstate->x= cx;
-
-#if defined(__APPLE__) && defined(GHOST_COCOA)
- //Cocoa already uses coordinates with y=0 at bottom
- win->eventstate->y= cy;
-#else
win->eventstate->y= (win->sizey-1) - cy;
-#endif
event= *(win->eventstate); /* copy last state, like mouse coords */
@@ -1009,6 +998,8 @@ void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *
if(wt==timer)
break;
if(wt) {
+ if(wm->reports.reporttimer == wt)
+ wm->reports.reporttimer= NULL;
BLI_remlink(&wm->timers, wt);
if(wt->customdata)
@@ -1145,12 +1136,7 @@ void wm_get_cursor_position(wmWindow *win, int *x, int *y)
{
GHOST_GetCursorPosition(g_system, x, y);
GHOST_ScreenToClient(win->ghostwin, *x, *y, x, y);
-#if defined(__APPLE__) && defined(GHOST_COCOA)
- //Cocoa has silly exception that should be fixed at the ghost level
- //(ghost is an allegory for an invisible system specific code)
-#else
*y = (win->sizey-1) - *y;
-#endif
}
/* ******************* exported api ***************** */
@@ -1183,9 +1169,8 @@ void WM_cursor_warp(wmWindow *win, int x, int y)
if (win && win->ghostwin) {
int oldx=x, oldy=y;
-#if !defined(__APPLE__) || !defined(GHOST_COCOA)
y= win->sizey -y - 1;
-#endif
+
GHOST_ClientToScreen(win->ghostwin, x, y, &x, &y);
GHOST_SetCursorPosition(g_system, x, y);