emX11WindowPort::~emX11WindowPort() { int i; // When modifying this, the implementation of WindowFlagsChanged // may have to be modified too. SetModalState(false); if (FullscreenUpdateTimer) { delete FullscreenUpdateTimer; FullscreenUpdateTimer=NULL; } if (Screen.GrabbingWinPort==this) Screen.GrabbingWinPort=NULL; for (i=Screen.WinPorts.GetCount()-1; i>=0; i--) { if (Screen.WinPorts[i]==this) { Screen.WinPorts.Remove(i); break; } } XMutex.Lock(); XFreeGC(Disp,Gc); XMutex.Unlock(); Gc=NULL; if (InputContext) { XMutex.Lock(); XDestroyIC(InputContext); XMutex.Unlock(); InputContext=NULL; } Screen.WCThread->RemoveWindow(Win); XMutex.Lock(); XDestroyWindow(Disp,Win); XMutex.Unlock(); Win=None; }
QXIMInputContext::~QXIMInputContext() { #if !defined(QT_NO_XIM) if (qt_xim && ic) XDestroyIC((XIC) ic); if( ximContextList ) { ximContextList->remove( this ); if(ximContextList->isEmpty()) { // Calling XCloseIM gives a Purify FMR error // XCloseIM( qt_xim ); // We prefer a less serious memory leak if( qt_xim ) { qt_xim = 0; isInitXIM = FALSE; } delete ximContextList; ximContextList = 0; } } #endif // !QT_NO_XIM ic = 0; }
/* x_keyboard_exit * Shut down the X11 keyboard driver. */ static void x_keyboard_exit(void) { if (!xkeyboard_installed) return; xkeyboard_installed = 0; XLOCK(); #ifdef ALLEGRO_XWINDOWS_WITH_XIM if (xic) { XDestroyIC(xic); xic = NULL; } if (xim) { XCloseIM(xim); xim = NULL; } #endif if (xmodmap) { XFreeModifiermap(xmodmap); xmodmap = NULL; } if (keysyms) { XFree(keysyms); keysyms = NULL; } XUNLOCK(); }
TInputContext::~TInputContext() { char* result = XmbResetIC(fXIC); if (result) XFree(result); XDestroyIC(fXIC); }
void OS_X11::finalize() { if(main_loop) memdelete(main_loop); main_loop=NULL; spatial_sound_server->finish(); memdelete(spatial_sound_server); spatial_sound_2d_server->finish(); memdelete(spatial_sound_2d_server); //if (debugger_connection_console) { // memdelete(debugger_connection_console); //} #ifdef JOYDEV_ENABLED memdelete(joystick); #endif memdelete(input); memdelete(sample_manager); audio_server->finish(); memdelete(audio_server); visual_server->finish(); memdelete(visual_server); memdelete(rasterizer); physics_server->finish(); memdelete(physics_server); physics_2d_server->finish(); memdelete(physics_2d_server); XUnmapWindow( x11_display, x11_window ); XDestroyWindow( x11_display, x11_window ); #if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED) memdelete(context_gl); #endif for(int i=0;i<CURSOR_MAX;i++) { if( cursors[i] != None ) XFreeCursor( x11_display, cursors[i] ); if( img[i] != NULL ) XcursorImageDestroy( img[i] ); }; XDestroyIC( xic ); XCloseIM( xim ); XCloseDisplay(x11_display); if (xmbstring) memfree(xmbstring); args.clear(); }
int ngi_window_deinit_xlib(ngi_window* win) { if(win->app->type != ngi_wm_api_xlib) return 0; if(win->plat.xlib.win) XDestroyWindow(win->app->plat.xlib.dpy, (Window)win->plat.xlib.win); if(win->plat.xlib.xic) XDestroyIC(win->plat.xlib.xic); return 1; }
void t_keyboard_context_unref(struct t_ic *ic) { if(--ic->ref < 1) { xic_all = g_slist_remove(xic_all, ic); if(ic->xic) XDestroyIC(ic->xic); g_slice_free(struct t_ic, ic); } }
/* this function should be called within AWT_LOCK() */ static void destroyX11InputMethodData(JNIEnv *env, X11InputMethodData *pX11IMData) { /* * Destroy XICs */ if (pX11IMData->ic_active != (XIC)0) { XUnsetICFocus(pX11IMData->ic_active); XDestroyIC(pX11IMData->ic_active); if (pX11IMData->ic_active != pX11IMData->ic_passive) { if (pX11IMData->ic_passive != (XIC)0) { XUnsetICFocus(pX11IMData->ic_passive); XDestroyIC(pX11IMData->ic_passive); } pX11IMData->ic_passive = (XIC)0; pX11IMData->current_ic = (XIC)0; } } freeX11InputMethodData(env, pX11IMData); }
void x_destroy() { debug("."); XFreeFontSet(X.dpy, X.font); XFreeFontSet(X.dpy, X.bold_font); XDestroyIC(X.xic); XCloseIM(X.xim); XFreePixmap(X.dpy, X.pixmap); XFreeGC(X.dpy, X.gc); XCloseDisplay(X.dpy); }
/** * Undo what window_open() does */ static void window_close(glw_x11_t *gx11) { if(gx11->ic != NULL) { XDestroyIC(gx11->ic); gx11->ic = NULL; } show_cursor(gx11); XDestroyWindow(gx11->display, gx11->win); glXDestroyContext(gx11->display, gx11->glxctx); XFreeColormap(gx11->display, gx11->colormap); }
x_window_rep::~x_window_rep () { set_identifier (w, 0); XEvent report; while (XCheckWindowEvent (dpy, win, 0xffffffff, &report)); tm_delete (ren); if (ic_ok) XDestroyIC (ic); Window_to_window->reset (win); nr_windows--; XDestroyWindow (dpy, win); gui->deleted_window (win); }
void X11Window::terminate() { if(m_cursor != None) { XUndefineCursor(m_display, m_window); m_cursor = None; } if(m_hiddenCursor) { XFreeCursor(m_display, m_hiddenCursor); m_hiddenCursor = 0; } for(Cursor cursor : m_cursors) XFreeCursor(m_display, cursor); m_cursors.clear(); if(m_window) { XDestroyWindow(m_display, m_window); m_window = 0; } if(m_colormap) { XFreeColormap(m_display, m_colormap); m_colormap = 0; } internalDestroyGLContext(); if(m_visual) { XFree(m_visual); m_visual = 0; } if(m_xic) { XDestroyIC(m_xic); m_xic = 0; } if(m_xim) { XCloseIM(m_xim); m_xim = 0; } if(m_display) { XCloseDisplay(m_display); m_display = 0; } m_visible = false; }
void rxvt_term::im_destroy () { if (input_method) { if (Input_Context && input_method->xim) XDestroyIC (Input_Context); display->put_xim (input_method); input_method = 0; } Input_Context = 0; }
void CXWindowsPrimaryScreen::onPreClose() { CDisplayLock display(m_screen); if (m_ic != NULL) { XDestroyIC(m_ic); m_ic = NULL; } if (m_im != NULL) { XCloseIM(m_im); m_im = NULL; } m_lastKeycode = 0; }
void x11_destroy_input_context(XIM *xim, XIC *xic) { if (*xic) { XDestroyIC(*xic); *xic = NULL; } if (*xim) { XCloseIM(*xim); *xim = NULL; } }
// will also unmap the window if still displayed void textbox_free(textbox *tb) { if (tb->flags & TB_EDITABLE) { XDestroyIC(tb->xic); XCloseIM(tb->xim); } if (tb->text) free(tb->text); if (tb->prompt) free(tb->prompt); if (tb->font) XftFontClose(display, tb->font); XDestroyWindow(display, tb->window); free(tb); }
static void del_win(int win_index) { if (!ui->w[win_index].c) die("there is not a window to delete"); XMapWindow(ui->dpy, ui->w[win_index].win); XDestroyWindow(ui->dpy, ui->w[win_index].win); XDestroyIC(ui->w[win_index].xic); XFreePixmap(ui->dpy, ui->w[win_index].canvas); XFreeGC(ui->dpy, ui->w[win_index].gc); cairo_destroy(ui->w[win_index].c); ui->w[win_index].c = NULL; cairo_surface_destroy(ui->w[win_index].cs); pango_font_description_free(ui->w[win_index].pangofont); g_object_unref(ui->w[win_index].pangolayout); }
void destroygui() { XDestroyIC(ic); XCloseIM(im); while (inputs) destroyinput(inputs); XFreeGC(dpy, dc.gc); XFreePixmap(dpy, dc.drawable); XFreeCursor(dpy, cursor); if (dc.font.set) XFreeFontSet(dpy, dc.font.set); else XFreeFont(dpy, dc.font.xfont); XSync(dpy, False); }
void DesktopWindowLinux::freeResources() { delete m_eventSource; if (m_context) destroyGLContext(); if (m_window) XDestroyWindow(m_display, m_window); if (m_cursor) XFreeCursor(m_display, m_cursor); if (m_display) XCloseDisplay(m_display); if (m_ic) XDestroyIC(m_ic); if (m_im) XCloseIM(m_im); }
void gui_destroy(struct gui_instance *gi) { if(gi->gc) XFreeGC(GUI_display, gi->gc); if(gi->front_buffer) XRenderFreePicture(GUI_display, gi->front_buffer); if(gi->back_buffer) XRenderFreePicture(GUI_display, gi->back_buffer); if(gi->xic) XDestroyIC(gi->xic); if(gi->window) XDestroyWindow(GUI_display, gi->window); }
void StXDisplay::close() { if(hInputCtx != None) { XDestroyIC(hInputCtx); hInputCtx = None; } if(hInputMethod != None) { XCloseIM(hInputMethod); hInputMethod = None; } if(hDisplay != NULL) { XCloseDisplay(hDisplay); hDisplay = NULL; } if(hVisInfo != NULL) { XFree(hVisInfo); hVisInfo = NULL; } }
static void scalefilterFiniDisplay (CompPlugin *p, CompDisplay *d) { FILTER_DISPLAY (d); UNWRAP (fd, d, handleEvent); UNWRAP (fd, d, handleEcompEvent); if (fd->xic) XDestroyIC (fd->xic); if (fd->xim) XCloseIM (fd->xim); freeScreenPrivateIndex (d, fd->screenPrivateIndex); free (fd); }
void window_deinit(WWindow *wwin) { region_deinit((WRegion*)wwin); region_pointer_focus_hack(&wwin->region); if(wwin->xic!=NULL) XDestroyIC(wwin->xic); if(wwin->win!=None){ XDeleteContext(ioncore_g.dpy, wwin->win, ioncore_g.win_context); /* Probably should not try destroy if root window... */ XDestroyWindow(ioncore_g.dpy, wwin->win); } /* There are no backlinks from WStacking to us, so it is not * necessary to do any deinitialisation there. */ }
BrowserControl::~BrowserControl() { delete m_eventSource; delete m_backButton; delete m_forwardButton; delete m_refreshButton; delete m_urlBar; delete m_toolBar; delete m_browserWindow; if (m_ic) XDestroyIC(m_ic); if (m_im) XCloseIM(m_im); if (m_display) XCloseDisplay(m_display); }
void imf_context_data_destroy(Ecore_IMF_Context_Data *imf_context_data) { if (!imf_context_data) return; if (imf_context_data->ic) XDestroyIC(imf_context_data->ic); free(imf_context_data->preedit_chars); if (imf_context_data->feedbacks) { free(imf_context_data->feedbacks); imf_context_data->feedbacks = NULL; } free(imf_context_data->locale); free(imf_context_data); }
void t_keyboard_shutdown(void) { GSList *it; XFreeModifiermap(modmap); modmap = NULL; XFree(keymap); keymap = NULL; for(it = xic_all; it; it = g_slist_next(it)) { struct t_ic *ic = it->data; if(ic->xic) { XDestroyIC(ic->xic); ic->xic = NULL; } } if(xim) XCloseIM(xim); xim = NULL; xim_style = 0; started = FALSE; }
static void DestroyIC(Widget w, XawVendorShellExtPart *ve) { XawIcTableList p; if ((ve->im.xim == NULL) || ((p = GetIcTableShared(w, ve)) == NULL) || (p->xic == NULL)) return; if (IsSharedIC(ve)) { if (GetIcTable(w, ve) == ve->ic.current_ic_table) { UnsetICFocus(w, ve); } return; } XDestroyIC(p->xic); if (!IsSharedIC(ve)) { if (p->input_style & XIMPreeditPosition) { XtRemoveEventHandler(w, (EventMask)StructureNotifyMask, FALSE, (XtEventHandler)ConfigureCB, (Opaque)NULL); } } }
void ui_cleanup(void) { XDestroyWindow(ui->dpy, ui->w[ui->cur].win); XUngrabKeyboard(ui->dpy, CurrentTime); XUngrabPointer(ui->dpy, CurrentTime); XDestroyIC(ui->w[0].xic); XCloseIM(ui->xim); if (ui->w[ui->cur].canvas) XFreePixmap(ui->dpy, ui->w[ui->cur].canvas); if (ui->w[ui->cur].gc) XFreeGC(ui->dpy, ui->w[ui->cur].gc); if (ui->dpy) XCloseDisplay(ui->dpy); cairo_destroy(ui->w[ui->cur].c); cairo_surface_destroy(ui->w[ui->cur].cs); pango_font_description_free(ui->w[ui->cur].pangofont); g_object_unref(ui->w[ui->cur].pangolayout); xfree(ui); }
void emX11WindowPort::WindowFlagsChanged() { int i; SetModalState(false); if (FullscreenUpdateTimer) { delete FullscreenUpdateTimer; FullscreenUpdateTimer=NULL; } if (Screen.GrabbingWinPort==this) Screen.GrabbingWinPort=NULL; XMutex.Lock(); XFreeGC(Disp,Gc); XMutex.Unlock(); Gc=NULL; if (InputContext) { XMutex.Lock(); XDestroyIC(InputContext); XMutex.Unlock(); InputContext=NULL; } Screen.WCThread->RemoveWindow(Win); XMutex.Lock(); XDestroyWindow(Disp,Win); XMutex.Unlock(); Win=None; PreConstruct(); for (i=0; i<Screen.WinPorts.GetCount(); i++) { if ( Screen.WinPorts[i]->Owner==this && Screen.WinPorts[i]->Win!=None ) { XMutex.Lock(); XSetTransientForHint(Disp,Screen.WinPorts[i]->Win,Win); XMutex.Unlock(); } } }
/* x_keyboard_exit * Shut down the X11 keyboard driver. */ static void x_keyboard_exit(void) { if (!xkeyboard_installed) return; xkeyboard_installed = 0; ALLEGRO_SYSTEM_XGLX *s = (void *)al_get_system_driver(); _al_mutex_lock(&s->lock); #ifdef ALLEGRO_XWINDOWS_WITH_XIM if (xic) { XDestroyIC(xic); xic = NULL; } if (xim) { XCloseIM(xim); xim = NULL; } #endif if (xmodmap) { XFreeModifiermap(xmodmap); xmodmap = NULL; } if (keysyms) { XFree(keysyms); keysyms = NULL; } _al_mutex_unlock(&s->lock); }