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.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 8f8577e2616..1b08b8dad92 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -462,7 +462,7 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win)
/* Informs GHOST of unsaved changes, to set window modified visual indicator (macOS)
* 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, Command+Q, (...), or session end). */
- GHOST_SetWindowModifiedState(win->ghostwin, (GHOST_TUns8)!wm->file_saved);
+ GHOST_SetWindowModifiedState(win->ghostwin, (bool)!wm->file_saved);
}
}
@@ -1136,14 +1136,12 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
return 1;
}
if (!ghostwin) {
- /* XXX - should be checked, why are we getting an event here, and */
- /* what is it? */
+ /* XXX: should be checked, why are we getting an event here, and what is it? */
puts("<!> event has no window");
return 1;
}
if (!GHOST_ValidWindow(g_system, ghostwin)) {
- /* XXX - should be checked, why are we getting an event here, and */
- /* what is it? */
+ /* XXX: should be checked, why are we getting an event here, and what is it? */
puts("<!> event has invalid window");
return 1;
}
@@ -1724,7 +1722,7 @@ static char *wm_clipboard_text_get_ex(bool selection, int *r_len, bool firstline
return NULL;
}
- char *buf = (char *)GHOST_getClipboard(selection);
+ char *buf = GHOST_getClipboard(selection);
if (!buf) {
*r_len = 0;
return NULL;
@@ -1811,10 +1809,10 @@ void WM_clipboard_text_set(const char *buf, bool selection)
}
*p2 = '\0';
- GHOST_putClipboard((GHOST_TInt8 *)newbuf, selection);
+ GHOST_putClipboard(newbuf, selection);
MEM_freeN(newbuf);
#else
- GHOST_putClipboard((GHOST_TInt8 *)buf, selection);
+ GHOST_putClipboard(buf, selection);
#endif
}
}
@@ -2405,6 +2403,10 @@ void wm_window_IME_begin(wmWindow *win, int x, int y, int w, int h, bool complet
{
BLI_assert(win);
+ /* Convert to native OS window coordinates. */
+ float fac = GHOST_GetNativePixelSize(win->ghostwin);
+ x /= fac;
+ y /= fac;
GHOST_BeginIME(win->ghostwin, x, win->sizey - y, w, h, complete);
}